From 902675c32402f4caabac7c7c783e5da88d6d039e Mon Sep 17 00:00:00 2001 From: Nathan McKinley Date: Thu, 13 Dec 2018 17:51:11 -0800 Subject: [PATCH] Reverting 1.20 and 1.19 cherrypick branches. --- .github/CONTRIBUTING.md | 4 - GNUmakefile | 2 +- google/config.go | 10 +- ...source_google_container_engine_versions.go | 1 + google/data_source_google_iam_role.go | 48 - google/data_source_google_iam_role_test.go | 51 - google/iam_billing_account.go | 105 - google/iam_compute_subnetwork.go | 6 +- google/iam_spanner_database.go | 15 +- google/provider.go | 8 +- google/provider_compute_gen.go | 1 - google/provider_monitoring_gen.go | 5 +- google/provider_storage_gen.go | 22 - google/resource_bigquery_dataset.go | 2 +- google/resource_cloudfunctions_function.go | 18 - .../resource_cloudfunctions_function_test.go | 15 +- google/resource_cloudiot_registry.go | 23 +- google/resource_cloudiot_registry_test.go | 21 +- google/resource_composer_environment.go | 34 +- google/resource_composer_environment_test.go | 8 +- ...resource_compute_address_generated_test.go | 23 - google/resource_compute_address_test.go | 21 + ...ource_compute_autoscaler_generated_test.go | 23 - google/resource_compute_autoscaler_test.go | 20 + ...e_compute_backend_bucket_generated_test.go | 23 - .../resource_compute_backend_bucket_test.go | 18 + google/resource_compute_disk.go | 120 +- google/resource_compute_disk_test.go | 191 +- ...esource_compute_firewall_generated_test.go | 23 - google/resource_compute_firewall_test.go | 86 + ..._compute_forwarding_rule_generated_test.go | 23 - .../resource_compute_forwarding_rule_test.go | 19 + ...e_compute_global_address_generated_test.go | 23 - .../resource_compute_global_address_test.go | 18 + google/resource_compute_health_check.go | 42 - ...rce_compute_health_check_generated_test.go | 23 - google/resource_compute_health_check_test.go | 18 + ...ompute_http_health_check_generated_test.go | 23 - ...resource_compute_http_health_check_test.go | 18 + ...mpute_https_health_check_generated_test.go | 23 - ...esource_compute_https_health_check_test.go | 18 + ...resource_compute_instance_group_manager.go | 20 +- ...rce_compute_instance_group_manager_test.go | 4 +- google/resource_compute_instance_template.go | 50 +- ...resource_compute_instance_template_test.go | 116 - google/resource_compute_project_metadata.go | 32 +- .../resource_compute_project_metadata_item.go | 17 +- .../resource_compute_project_metadata_test.go | 134 +- ...ompute_region_autoscaler_generated_test.go | 23 - ...resource_compute_region_autoscaler_test.go | 19 + google/resource_compute_region_disk.go | 20 + ...urce_compute_region_disk_generated_test.go | 23 - google/resource_compute_region_disk_test.go | 18 + ...e_compute_region_instance_group_manager.go | 24 +- ...pute_region_instance_group_manager_test.go | 5 +- .../resource_compute_route_generated_test.go | 23 - google/resource_compute_route_test.go | 18 + .../resource_compute_router_generated_test.go | 23 - google/resource_compute_router_nat.go | 387 - google/resource_compute_router_nat_test.go | 224 - google/resource_compute_router_test.go | 34 + google/resource_compute_snapshot.go | 814 +- google/resource_compute_snapshot_test.go | 567 +- ..._compute_ssl_certificate_generated_test.go | 23 - .../resource_compute_ssl_certificate_test.go | 18 + ...ource_compute_ssl_policy_generated_test.go | 23 - google/resource_compute_ssl_policy_test.go | 18 + ...ource_compute_subnetwork_generated_test.go | 23 - google/resource_compute_subnetwork_test.go | 19 + ...ompute_target_http_proxy_generated_test.go | 23 - ...resource_compute_target_http_proxy_test.go | 18 + ...mpute_target_https_proxy_generated_test.go | 23 - ...esource_compute_target_https_proxy_test.go | 18 + ...compute_target_ssl_proxy_generated_test.go | 23 - .../resource_compute_target_ssl_proxy_test.go | 18 + ...compute_target_tcp_proxy_generated_test.go | 23 - .../resource_compute_target_tcp_proxy_test.go | 18 + ...urce_compute_vpn_gateway_generated_test.go | 23 - google/resource_compute_vpn_gateway_test.go | 25 + ...ource_compute_vpn_tunnel_generated_test.go | 23 - google/resource_compute_vpn_tunnel_test.go | 28 + google/resource_container_cluster.go | 141 +- google/resource_container_cluster_test.go | 69 - google/resource_container_node_pool.go | 7 +- google/resource_dataproc_job.go | 7 - ...esource_google_billing_account_iam_test.go | 178 - ...resource_google_project_iam_custom_role.go | 8 +- .../resource_google_project_services_test.go | 11 +- google/resource_google_service_account.go | 19 +- .../resource_google_service_account_test.go | 14 - google/resource_kms_crypto_key_iam_test.go | 3 - google/resource_kms_key_ring_iam_test.go | 4 - google/resource_monitoring_group.go | 295 - ...esource_monitoring_group_generated_test.go | 113 - google/resource_monitoring_group_test.go | 47 - ...esource_monitoring_notification_channel.go | 376 - ...ing_notification_channel_generated_test.go | 79 - ...ce_monitoring_notification_channel_test.go | 49 - ...resource_monitoring_uptime_check_config.go | 1057 -- ...ring_uptime_check_config_generated_test.go | 138 - ...rce_monitoring_uptime_check_config_test.go | 71 - google/resource_pubsub_topic.go | 2 +- google/resource_redis_instance.go | 4 +- .../resource_redis_instance_generated_test.go | 23 - google/resource_redis_instance_test.go | 27 + google/resource_spanner_database.go | 122 +- google/resource_spanner_database_test.go | 162 +- google/resource_sql_database_instance.go | 14 +- google/resource_sql_ssl_cert.go | 177 - google/resource_sql_ssl_cert_test.go | 136 - google/resource_sql_user.go | 2 +- ...e_storage_default_object_access_control.go | 333 - ...lt_object_access_control_generated_test.go | 82 - ...rage_default_object_access_control_test.go | 110 - .../resource_storage_object_access_control.go | 343 - ...ge_object_access_control_generated_test.go | 88 - ...urce_storage_object_access_control_test.go | 125 - google/test-fixtures/header-logo.png | Bin 3368 -> 0 bytes google/transport.go | 6 - google/transport_test.go | 44 - .../api/appengine/v1/appengine-api.json | 16 +- .../api/appengine/v1/appengine-gen.go | 262 +- .../api/bigquery/v2/bigquery-api.json | 29 +- .../api/bigquery/v2/bigquery-gen.go | 192 +- .../api/cloudbilling/v1/cloudbilling-gen.go | 81 +- .../api/cloudbuild/v1/cloudbuild-api.json | 49 +- .../api/cloudbuild/v1/cloudbuild-gen.go | 162 +- .../cloudfunctions/v1/cloudfunctions-api.json | 259 +- .../cloudfunctions/v1/cloudfunctions-gen.go | 1038 +- .../api/cloudiot/v1/cloudiot-api.json | 142 +- .../api/cloudiot/v1/cloudiot-gen.go | 640 +- .../api/cloudkms/v1/cloudkms-api.json | 56 +- .../api/cloudkms/v1/cloudkms-gen.go | 225 +- .../v1/cloudresourcemanager-api.json | 8 +- .../v1/cloudresourcemanager-gen.go | 243 +- .../v2beta1/cloudresourcemanager-api.json | 4 +- .../v2beta1/cloudresourcemanager-gen.go | 81 +- .../api/composer/v1/composer-api.json | 8 +- .../api/composer/v1/composer-gen.go | 83 +- .../api/compute/v0.beta/compute-api.json | 1103 +- .../api/compute/v0.beta/compute-gen.go | 4930 +------ .../api/compute/v1/compute-api.json | 46 +- .../api/compute/v1/compute-gen.go | 2287 +-- .../api/container/v1/container-api.json | 35 +- .../api/container/v1/container-gen.go | 428 +- .../api/container/v1beta1/container-api.json | 14 +- .../api/container/v1beta1/container-gen.go | 340 +- .../api/dataflow/v1b3/dataflow-api.json | 54 +- .../api/dataflow/v1b3/dataflow-gen.go | 276 +- .../api/dataproc/v1/dataproc-api.json | 1276 +- .../api/dataproc/v1/dataproc-gen.go | 5280 +------ .../api/discovery/v1/discovery-gen.go | 21 +- .../google.golang.org/api/dns/v1/dns-gen.go | 99 +- .../api/dns/v1beta2/dns-api.json | 63 +- .../api/dns/v1beta2/dns-gen.go | 183 +- .../api/file/v1beta1/file-api.json | 194 +- .../api/file/v1beta1/file-gen.go | 304 +- .../api/gensupport/jsonfloat.go | 2 +- .../google.golang.org/api/gensupport/retry.go | 2 +- .../google.golang.org/api/iam/v1/iam-api.json | 22 +- .../google.golang.org/api/iam/v1/iam-gen.go | 267 +- .../google.golang.org/api/internal/creds.go | 5 +- vendor/google.golang.org/api/internal/pool.go | 2 +- .../api/internal/settings.go | 23 +- .../api/iterator/iterator.go | 2 +- .../api/logging/v2/logging-api.json | 38 +- .../api/logging/v2/logging-gen.go | 510 +- .../api/monitoring/v3/monitoring-api.json | 3704 ----- .../api/monitoring/v3/monitoring-gen.go | 11613 ---------------- .../api/option/credentials_go19.go | 2 +- .../api/option/credentials_notgo19.go | 2 +- vendor/google.golang.org/api/option/option.go | 21 +- .../api/pubsub/v1/pubsub-api.json | 35 +- .../api/pubsub/v1/pubsub-gen.go | 369 +- .../api/redis/v1beta1/redis-api.json | 15 +- .../api/redis/v1beta1/redis-gen.go | 90 +- .../v1beta1/runtimeconfig-api.json | 6 +- .../v1beta1/runtimeconfig-gen.go | 152 +- .../v1/servicemanagement-api.json | 111 +- .../v1/servicemanagement-gen.go | 698 +- .../v1beta1/serviceusage-api.json | 135 +- .../serviceusage/v1beta1/serviceusage-gen.go | 705 +- .../api/sourcerepo/v1/sourcerepo-gen.go | 69 +- .../api/spanner/v1/spanner-api.json | 76 +- .../api/spanner/v1/spanner-gen.go | 570 +- .../api/sqladmin/v1beta4/sqladmin-api.json | 52 +- .../api/sqladmin/v1beta4/sqladmin-gen.go | 375 +- .../api/storage/v1/storage-api.json | 18 +- .../api/storage/v1/storage-gen.go | 319 +- .../google.golang.org/api/transport/dial.go | 2 +- .../google.golang.org/api/transport/go19.go | 2 +- .../api/transport/grpc/dial.go | 6 +- .../api/transport/grpc/go18.go | 2 +- .../api/transport/grpc/not_go18.go | 2 +- .../api/transport/http/dial.go | 2 +- .../api/transport/http/go18.go | 4 +- .../http/internal/propagation/http.go | 96 - .../api/transport/http/not_go18.go | 2 +- .../api/transport/not_go19.go | 2 +- vendor/vendor.json | 252 +- version/version.go | 6 - ...urce_cloudfunctions_function.html.markdown | 1 - .../datasource_google_iam_role.html.markdown | 36 - website/docs/getting_started.html.markdown | 2 +- .../r/app_engine_application.html.markdown | 2 +- ...binaryauthorization_attestor.html.markdown | 3 +- .../binaryauthorization_policy.html.markdown | 3 +- .../r/cloudfunctions_function.html.markdown | 10 +- .../docs/r/composer_environment.html.markdown | 1 - website/docs/r/compute_address.html.markdown | 24 +- .../docs/r/compute_autoscaler.html.markdown | 8 +- .../r/compute_backend_bucket.html.markdown | 8 +- website/docs/r/compute_disk.html.markdown | 8 +- website/docs/r/compute_firewall.html.markdown | 8 +- .../r/compute_forwarding_rule.html.markdown | 8 +- .../r/compute_global_address.html.markdown | 8 +- .../docs/r/compute_health_check.html.markdown | 20 +- .../r/compute_http_health_check.html.markdown | 8 +- .../compute_https_health_check.html.markdown | 8 +- .../r/compute_instance_template.html.markdown | 14 - .../r/compute_project_metadata.html.markdown | 6 - ...ompute_project_metadata_item.html.markdown | 9 - .../r/compute_region_autoscaler.html.markdown | 8 +- .../docs/r/compute_region_disk.html.markdown | 8 +- ...egion_instance_group_manager.html.markdown | 4 +- website/docs/r/compute_route.html.markdown | 8 +- website/docs/r/compute_router.html.markdown | 8 +- website/docs/r/compute_snapshot.html.markdown | 204 +- .../r/compute_ssl_certificate.html.markdown | 24 +- .../docs/r/compute_ssl_policy.html.markdown | 8 +- .../docs/r/compute_subnetwork.html.markdown | 8 +- .../r/compute_target_http_proxy.html.markdown | 8 +- .../compute_target_https_proxy.html.markdown | 8 +- .../r/compute_target_ssl_proxy.html.markdown | 8 +- .../r/compute_target_tcp_proxy.html.markdown | 8 +- .../docs/r/compute_vpn_gateway.html.markdown | 8 +- .../docs/r/compute_vpn_tunnel.html.markdown | 8 +- .../docs/r/container_cluster.html.markdown | 24 - .../r/containeranalysis_note.html.markdown | 8 +- .../docs/r/filestore_instance.html.markdown | 8 +- .../r/google_billing_account_iam_binding.md | 54 - .../r/google_billing_account_iam_member.md | 51 - .../r/google_billing_account_iam_policy.md | 56 - website/docs/r/monitoring_group.html.markdown | 123 - ...itoring_notification_channel.html.markdown | 112 - ...nitoring_uptime_check_config.html.markdown | 257 - website/docs/r/redis_instance.html.markdown | 22 +- .../docs/r/resourcemanager_lien.html.markdown | 3 +- website/docs/r/spanner_database.html.markdown | 2 +- .../r/sql_database_instance.html.markdown | 2 - website/docs/r/sql_ssl_cert.html.markdown | 63 - website/docs/r/storage_bucket.html.markdown | 4 +- ...efault_object_access_control.html.markdown | 139 - .../storage_default_object_acl.html.markdown | 8 - ...torage_object_access_control.html.markdown | 143 - website/google.erb | 32 +- 256 files changed, 5431 insertions(+), 45765 deletions(-) delete mode 100644 google/data_source_google_iam_role.go delete mode 100644 google/data_source_google_iam_role_test.go delete mode 100644 google/iam_billing_account.go delete mode 100644 google/provider_storage_gen.go delete mode 100644 google/resource_compute_router_nat.go delete mode 100644 google/resource_compute_router_nat_test.go delete mode 100644 google/resource_google_billing_account_iam_test.go delete mode 100644 google/resource_monitoring_group.go delete mode 100644 google/resource_monitoring_group_generated_test.go delete mode 100644 google/resource_monitoring_group_test.go delete mode 100644 google/resource_monitoring_notification_channel.go delete mode 100644 google/resource_monitoring_notification_channel_generated_test.go delete mode 100644 google/resource_monitoring_notification_channel_test.go delete mode 100644 google/resource_monitoring_uptime_check_config.go delete mode 100644 google/resource_monitoring_uptime_check_config_generated_test.go delete mode 100644 google/resource_monitoring_uptime_check_config_test.go delete mode 100644 google/resource_sql_ssl_cert.go delete mode 100644 google/resource_sql_ssl_cert_test.go delete mode 100644 google/resource_storage_default_object_access_control.go delete mode 100644 google/resource_storage_default_object_access_control_generated_test.go delete mode 100644 google/resource_storage_default_object_access_control_test.go delete mode 100644 google/resource_storage_object_access_control.go delete mode 100644 google/resource_storage_object_access_control_generated_test.go delete mode 100644 google/resource_storage_object_access_control_test.go delete mode 100644 google/test-fixtures/header-logo.png delete mode 100644 vendor/google.golang.org/api/monitoring/v3/monitoring-api.json delete mode 100644 vendor/google.golang.org/api/monitoring/v3/monitoring-gen.go delete mode 100644 vendor/google.golang.org/api/transport/http/internal/propagation/http.go delete mode 100644 version/version.go delete mode 100644 website/docs/d/datasource_google_iam_role.html.markdown delete mode 100644 website/docs/r/google_billing_account_iam_binding.md delete mode 100644 website/docs/r/google_billing_account_iam_member.md delete mode 100644 website/docs/r/google_billing_account_iam_policy.md delete mode 100644 website/docs/r/monitoring_group.html.markdown delete mode 100644 website/docs/r/monitoring_notification_channel.html.markdown delete mode 100644 website/docs/r/monitoring_uptime_check_config.html.markdown delete mode 100644 website/docs/r/sql_ssl_cert.html.markdown delete mode 100644 website/docs/r/storage_default_object_access_control.html.markdown delete mode 100644 website/docs/r/storage_object_access_control.html.markdown diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c941fafa..dbd4c0ee 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -43,8 +43,6 @@ GOOGLE_ORG GOOGLE_BILLING_ACCOUNT ``` -The only region we support running tests in right now is `us-central1` - some products that are tested here are only available in a few regions, and the only region that all products are available in is `us-central1`. - To run a specific test, use a command such as: ``` make testacc TEST=./google TESTARGS='-run=TestAccContainerNodePool_basic' @@ -52,8 +50,6 @@ make testacc TEST=./google TESTARGS='-run=TestAccContainerNodePool_basic' The `TESTARGS` variable is regexp-like, so multiple tests can be run in parallel by specifying a common substring of those tests (for example, `TestAccContainerNodePool` to run all node pool tests). -To run all tests, you can simply omit the `TESTARGS` argument - but please keep in mind that that is quite a few tests and will take quite a long time and create some fairly expensive resources. It usually is not advisable to run all tests. - ### Writing Tests Tests should confirm that a resource can be created, and that the resulting Terraform state has the correct values, as well as the created GCP resource. diff --git a/GNUmakefile b/GNUmakefile index 679fb6bd..32e443b0 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -14,7 +14,7 @@ test: fmtcheck xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4 testacc: fmtcheck - TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test $(TEST) -v $(TESTARGS) -timeout 120m -ldflags="-X=github.com/terraform-providers/terraform-provider-google/version.ProviderVersion=acc" + TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test $(TEST) -v $(TESTARGS) -timeout 120m vet: @echo "go vet ." diff --git a/google/config.go b/google/config.go index 7fed6477..3ddf7d39 100644 --- a/google/config.go +++ b/google/config.go @@ -10,8 +10,7 @@ import ( "github.com/hashicorp/terraform/helper/logging" "github.com/hashicorp/terraform/helper/pathorcontents" - "github.com/hashicorp/terraform/httpclient" - "github.com/terraform-providers/terraform-provider-google/version" + "github.com/hashicorp/terraform/version" "golang.org/x/oauth2" "golang.org/x/oauth2/google" @@ -155,10 +154,9 @@ func (c *Config) loadAndValidate() error { client.Transport = logging.NewTransport("Google", client.Transport) - terraformVersion := httpclient.UserAgentString() - providerVersion := fmt.Sprintf("terraform-provider-google/%s", version.ProviderVersion) - terraformWebsite := "(+https://www.terraform.io)" - userAgent := fmt.Sprintf("%s %s %s", terraformVersion, terraformWebsite, providerVersion) + projectURL := "https://www.terraform.io" + userAgent := fmt.Sprintf("Terraform/%s (+%s)", + version.String(), projectURL) c.client = client c.userAgent = userAgent diff --git a/google/data_source_google_container_engine_versions.go b/google/data_source_google_container_engine_versions.go index 6cd4bd94..5e6e4201 100644 --- a/google/data_source_google_container_engine_versions.go +++ b/google/data_source_google_container_engine_versions.go @@ -20,6 +20,7 @@ func dataSourceGoogleContainerEngineVersions() *schema.Resource { Optional: true, }, "region": { + Deprecated: "This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", Type: schema.TypeString, Optional: true, ConflictsWith: []string{"zone"}, diff --git a/google/data_source_google_iam_role.go b/google/data_source_google_iam_role.go deleted file mode 100644 index e96ae5fd..00000000 --- a/google/data_source_google_iam_role.go +++ /dev/null @@ -1,48 +0,0 @@ -package google - -import ( - "fmt" - - "github.com/hashicorp/terraform/helper/schema" -) - -func dataSourceGoogleIamRole() *schema.Resource { - return &schema.Resource{ - Read: dataSourceGoogleIamRoleRead, - Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ - Type: schema.TypeString, - Required: true, - }, - "title": { - Type: schema.TypeString, - Computed: true, - }, - "included_permissions": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "stage": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func dataSourceGoogleIamRoleRead(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - roleName := d.Get("name").(string) - role, err := config.clientIAM.Roles.Get(roleName).Do() - if err != nil { - return handleNotFoundError(err, d, fmt.Sprintf("Error reading IAM Role %s: %s", roleName, err)) - } - - d.SetId(role.Name) - d.Set("title", role.Title) - d.Set("stage", role.Stage) - d.Set("included_permissions", role.IncludedPermissions) - - return nil -} diff --git a/google/data_source_google_iam_role_test.go b/google/data_source_google_iam_role_test.go deleted file mode 100644 index cb58323a..00000000 --- a/google/data_source_google_iam_role_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package google - -import ( - "errors" - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" -) - -func TestAccDataSourceIAMRole(t *testing.T) { - name := "roles/viewer" - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - Steps: []resource.TestStep{ - { - Config: testAccCheckGoogleIamRoleConfig(name), - Check: resource.ComposeTestCheckFunc( - testAccCheckGoogleIAMRoleCheck("data.google_iam_role.role"), - ), - }, - }, - }) -} - -func testAccCheckGoogleIAMRoleCheck(n string) resource.TestCheckFunc { - return func(s *terraform.State) error { - ds, ok := s.RootModule().Resources[n] - if !ok { - return fmt.Errorf("Can't find iam role data source: %s", n) - } - - _, ok = ds.Primary.Attributes["included_permissions.#"] - if !ok { - return errors.New("can't find 'included_permissions' attribute") - } - - return nil - } -} - -func testAccCheckGoogleIamRoleConfig(name string) string { - return fmt.Sprintf(` -data "google_iam_role" "role" { - name = "%s" -} -`, name) -} diff --git a/google/iam_billing_account.go b/google/iam_billing_account.go deleted file mode 100644 index 15f6ba01..00000000 --- a/google/iam_billing_account.go +++ /dev/null @@ -1,105 +0,0 @@ -package google - -import ( - "fmt" - "github.com/hashicorp/errwrap" - "github.com/hashicorp/terraform/helper/schema" - "google.golang.org/api/cloudbilling/v1" - "google.golang.org/api/cloudresourcemanager/v1" -) - -var IamBillingAccountSchema = map[string]*schema.Schema{ - "billing_account_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, -} - -type BillingAccountIamUpdater struct { - billingAccountId string - Config *Config -} - -func NewBillingAccountIamUpdater(d *schema.ResourceData, config *Config) (ResourceIamUpdater, error) { - return &BillingAccountIamUpdater{ - billingAccountId: canonicalBillingAccountId(d.Get("billing_account_id").(string)), - Config: config, - }, nil -} - -func BillingAccountIdParseFunc(d *schema.ResourceData, _ *Config) error { - d.Set("billing_account_id", d.Id()) - return nil -} - -func (u *BillingAccountIamUpdater) GetResourceIamPolicy() (*cloudresourcemanager.Policy, error) { - return getBillingAccountIamPolicyByBillingAccountName(u.billingAccountId, u.Config) -} - -func (u *BillingAccountIamUpdater) SetResourceIamPolicy(policy *cloudresourcemanager.Policy) error { - billingPolicy, err := resourceManagerToBillingPolicy(policy) - if err != nil { - return err - } - - _, err = u.Config.clientBilling.BillingAccounts.SetIamPolicy("billingAccounts/"+u.billingAccountId, &cloudbilling.SetIamPolicyRequest{ - Policy: billingPolicy, - }).Do() - - if err != nil { - return errwrap.Wrapf(fmt.Sprintf("Error setting IAM policy for %s: {{err}}", u.DescribeResource()), err) - } - - return nil -} - -func (u *BillingAccountIamUpdater) GetResourceId() string { - return u.billingAccountId -} - -func (u *BillingAccountIamUpdater) GetMutexKey() string { - return fmt.Sprintf("iam-billing-account-%s", u.billingAccountId) -} - -func (u *BillingAccountIamUpdater) DescribeResource() string { - return fmt.Sprintf("billingAccount %q", u.billingAccountId) -} - -func canonicalBillingAccountId(resource string) string { - return resource -} - -func resourceManagerToBillingPolicy(p *cloudresourcemanager.Policy) (*cloudbilling.Policy, error) { - out := &cloudbilling.Policy{} - err := Convert(p, out) - if err != nil { - return nil, errwrap.Wrapf("Cannot convert a v1 policy to a billing policy: {{err}}", err) - } - return out, nil -} - -func billingToResourceManagerPolicy(p *cloudbilling.Policy) (*cloudresourcemanager.Policy, error) { - out := &cloudresourcemanager.Policy{} - err := Convert(p, out) - if err != nil { - return nil, errwrap.Wrapf("Cannot convert a billing policy to a v1 policy: {{err}}", err) - } - return out, nil -} - -// Retrieve the existing IAM Policy for a billing account -func getBillingAccountIamPolicyByBillingAccountName(resource string, config *Config) (*cloudresourcemanager.Policy, error) { - p, err := config.clientBilling.BillingAccounts.GetIamPolicy("billingAccounts/" + resource).Do() - - if err != nil { - return nil, errwrap.Wrapf(fmt.Sprintf("Error retrieving IAM policy for billing account %q: {{err}}", resource), err) - } - - v1Policy, err := billingToResourceManagerPolicy(p) - if err != nil { - return nil, err - } - - return v1Policy, nil -} diff --git a/google/iam_compute_subnetwork.go b/google/iam_compute_subnetwork.go index dcaf855c..7f9eaa4d 100644 --- a/google/iam_compute_subnetwork.go +++ b/google/iam_compute_subnetwork.go @@ -12,14 +12,14 @@ import ( var IamComputeSubnetworkSchema = map[string]*schema.Schema{ "subnetwork": { - Deprecated: "This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", + Deprecated: "This resource is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", Type: schema.TypeString, Required: true, ForceNew: true, }, "project": { - Deprecated: "This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", + Deprecated: "This resource is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", Type: schema.TypeString, Optional: true, Computed: true, @@ -27,7 +27,7 @@ var IamComputeSubnetworkSchema = map[string]*schema.Schema{ }, "region": { - Deprecated: "This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", + Deprecated: "This resource is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", Type: schema.TypeString, Optional: true, Computed: true, diff --git a/google/iam_spanner_database.go b/google/iam_spanner_database.go index be9c7f86..51994c16 100644 --- a/google/iam_spanner_database.go +++ b/google/iam_spanner_database.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" "google.golang.org/api/cloudresourcemanager/v1" - "google.golang.org/api/spanner/v1" + spanner "google.golang.org/api/spanner/v1" ) var IamSpannerDatabaseSchema = map[string]*schema.Schema{ @@ -51,8 +51,17 @@ func NewSpannerDatabaseIamUpdater(d *schema.ResourceData, config *Config) (Resou } func SpannerDatabaseIdParseFunc(d *schema.ResourceData, config *Config) error { - _, err := resourceSpannerDatabaseImport("database")(d, config) - return err + id, err := extractSpannerDatabaseId(d.Id()) + if err != nil { + return err + } + d.Set("instance", id.Instance) + d.Set("project", id.Project) + d.Set("database", id.Database) + + // Explicitly set the id so imported resources have the same ID format as non-imported ones. + d.SetId(id.terraformId()) + return nil } func (u *SpannerDatabaseIamUpdater) GetResourceIamPolicy() (*cloudresourcemanager.Policy, error) { diff --git a/google/provider.go b/google/provider.go index 74232966..69c148ac 100644 --- a/google/provider.go +++ b/google/provider.go @@ -87,7 +87,6 @@ func Provider() terraform.ResourceProvider { "google_container_registry_repository": dataSourceGoogleContainerRepo(), "google_container_registry_image": dataSourceGoogleContainerImage(), "google_iam_policy": dataSourceGoogleIamPolicy(), - "google_iam_role": dataSourceGoogleIamRole(), "google_kms_secret": dataSourceGoogleKmsSecret(), "google_folder": dataSourceGoogleFolder(), "google_netblock_ip_ranges": dataSourceGoogleNetblockIpRanges(), @@ -107,7 +106,6 @@ func Provider() terraform.ResourceProvider { GeneratedFilestoreResourcesMap, GeneratedRedisResourcesMap, GeneratedResourceManagerResourcesMap, - GeneratedStorageResourcesMap, GeneratedMonitoringResourcesMap, map[string]*schema.Resource{ "google_app_engine_application": resourceAppEngineApplication(), @@ -115,9 +113,6 @@ func Provider() terraform.ResourceProvider { "google_bigquery_table": resourceBigQueryTable(), "google_bigtable_instance": resourceBigtableInstance(), "google_bigtable_table": resourceBigtableTable(), - "google_billing_account_iam_binding": ResourceIamBindingWithImport(IamBillingAccountSchema, NewBillingAccountIamUpdater, BillingAccountIdParseFunc), - "google_billing_account_iam_member": ResourceIamMemberWithImport(IamBillingAccountSchema, NewBillingAccountIamUpdater, BillingAccountIdParseFunc), - "google_billing_account_iam_policy": ResourceIamPolicyWithImport(IamBillingAccountSchema, NewBillingAccountIamUpdater, BillingAccountIdParseFunc), "google_cloudbuild_trigger": resourceCloudBuildTrigger(), "google_cloudfunctions_function": resourceCloudFunctionsFunction(), "google_cloudiot_registry": resourceCloudIoTRegistry(), @@ -127,6 +122,7 @@ func Provider() terraform.ResourceProvider { "google_compute_attached_disk": resourceComputeAttachedDisk(), "google_compute_backend_service": resourceComputeBackendService(), "google_compute_disk": resourceComputeDisk(), + "google_compute_snapshot": resourceComputeSnapshot(), "google_compute_firewall": resourceComputeFirewall(), "google_compute_forwarding_rule": resourceComputeForwardingRule(), "google_compute_global_forwarding_rule": resourceComputeGlobalForwardingRule(), @@ -147,7 +143,6 @@ func Provider() terraform.ResourceProvider { "google_compute_route": resourceComputeRoute(), "google_compute_router": resourceComputeRouter(), "google_compute_router_interface": resourceComputeRouterInterface(), - "google_compute_router_nat": resourceComputeRouterNat(), "google_compute_router_peer": resourceComputeRouterPeer(), "google_compute_security_policy": resourceComputeSecurityPolicy(), "google_compute_shared_vpc_host_project": resourceComputeSharedVpcHostProject(), @@ -203,7 +198,6 @@ func Provider() terraform.ResourceProvider { "google_spanner_database_iam_policy": ResourceIamPolicyWithImport(IamSpannerDatabaseSchema, NewSpannerDatabaseIamUpdater, SpannerDatabaseIdParseFunc), "google_sql_database": resourceSqlDatabase(), "google_sql_database_instance": resourceSqlDatabaseInstance(), - "google_sql_ssl_cert": resourceSqlSslCert(), "google_sql_user": resourceSqlUser(), "google_organization_iam_binding": ResourceIamBindingWithImport(IamOrganizationSchema, NewOrganizationIamUpdater, OrgIdParseFunc), "google_organization_iam_custom_role": resourceGoogleOrganizationIamCustomRole(), diff --git a/google/provider_compute_gen.go b/google/provider_compute_gen.go index 5ca9fa01..170e1953 100644 --- a/google/provider_compute_gen.go +++ b/google/provider_compute_gen.go @@ -32,7 +32,6 @@ var GeneratedComputeResourcesMap = map[string]*schema.Resource{ "google_compute_region_disk": resourceComputeRegionDisk(), "google_compute_route": resourceComputeRoute(), "google_compute_router": resourceComputeRouter(), - "google_compute_snapshot": resourceComputeSnapshot(), "google_compute_ssl_certificate": resourceComputeSslCertificate(), "google_compute_ssl_policy": resourceComputeSslPolicy(), "google_compute_subnetwork": resourceComputeSubnetwork(), diff --git a/google/provider_monitoring_gen.go b/google/provider_monitoring_gen.go index 25a1319d..484e473a 100644 --- a/google/provider_monitoring_gen.go +++ b/google/provider_monitoring_gen.go @@ -17,8 +17,5 @@ package google import "github.com/hashicorp/terraform/helper/schema" var GeneratedMonitoringResourcesMap = map[string]*schema.Resource{ - "google_monitoring_alert_policy": resourceMonitoringAlertPolicy(), - "google_monitoring_group": resourceMonitoringGroup(), - "google_monitoring_notification_channel": resourceMonitoringNotificationChannel(), - "google_monitoring_uptime_check_config": resourceMonitoringUptimeCheckConfig(), + "google_monitoring_alert_policy": resourceMonitoringAlertPolicy(), } diff --git a/google/provider_storage_gen.go b/google/provider_storage_gen.go deleted file mode 100644 index 3cef3869..00000000 --- a/google/provider_storage_gen.go +++ /dev/null @@ -1,22 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - -package google - -import "github.com/hashicorp/terraform/helper/schema" - -var GeneratedStorageResourcesMap = map[string]*schema.Resource{ - "google_storage_object_access_control": resourceStorageObjectAccessControl(), - "google_storage_default_object_access_control": resourceStorageDefaultObjectAccessControl(), -} diff --git a/google/resource_bigquery_dataset.go b/google/resource_bigquery_dataset.go index a555b9af..e2cbf490 100644 --- a/google/resource_bigquery_dataset.go +++ b/google/resource_bigquery_dataset.go @@ -72,7 +72,7 @@ func resourceBigQueryDataset() *schema.Resource { Optional: true, ForceNew: true, Default: "US", - ValidateFunc: validation.StringInSlice([]string{"US", "EU", "asia-northeast1", "europe-west2", "australia-southeast1"}, false), + ValidateFunc: validation.StringInSlice([]string{"US", "EU", "asia-northeast1"}, false), }, // DefaultTableExpirationMs: [Optional] The default lifetime of all diff --git a/google/resource_cloudfunctions_function.go b/google/resource_cloudfunctions_function.go index 2a793e8d..41c87766 100644 --- a/google/resource_cloudfunctions_function.go +++ b/google/resource_cloudfunctions_function.go @@ -170,12 +170,6 @@ func resourceCloudFunctionsFunction() *schema.Resource { Optional: true, }, - "runtime": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "environment_variables": { Type: schema.TypeMap, Optional: true, @@ -322,7 +316,6 @@ func resourceCloudFunctionsCreate(d *schema.ResourceData, meta interface{}) erro function := &cloudfunctions.CloudFunction{ Name: cloudFuncId.cloudFunctionId(), - Runtime: d.Get("runtime").(string), ForceSendFields: []string{}, } @@ -433,7 +426,6 @@ func resourceCloudFunctionsRead(d *schema.ResourceData, meta interface{}) error } d.Set("timeout", timeout) d.Set("labels", function.Labels) - d.Set("runtime", function.Runtime) d.Set("environment_variables", function.EnvironmentVariables) if function.SourceArchiveUrl != "" { // sourceArchiveUrl should always be a Google Cloud Storage URL (e.g. gs://bucket/object) @@ -527,11 +519,6 @@ func resourceCloudFunctionsUpdate(d *schema.ResourceData, meta interface{}) erro updateMaskArr = append(updateMaskArr, "labels") } - if d.HasChange("runtime") { - function.Runtime = d.Get("runtime").(string) - updateMaskArr = append(updateMaskArr, "runtime") - } - if d.HasChange("environment_variables") { function.EnvironmentVariables = expandEnvironmentVariables(d) updateMaskArr = append(updateMaskArr, "environment_variables") @@ -607,11 +594,6 @@ func expandEventTrigger(configured []interface{}, project string) *cloudfunction eventType := data["event_type"].(string) shape := "" switch { - case strings.HasPrefix(eventType, "google.storage.object."): - shape = "projects/%s/buckets/%s" - case strings.HasPrefix(eventType, "google.pubsub.topic."): - shape = "projects/%s/topics/%s" - // Legacy style triggers case strings.HasPrefix(eventType, "providers/cloud.storage/eventTypes/"): shape = "projects/%s/buckets/%s" case strings.HasPrefix(eventType, "providers/cloud.pubsub/eventTypes/"): diff --git a/google/resource_cloudfunctions_function_test.go b/google/resource_cloudfunctions_function_test.go index 8f027cbc..9ca8ed00 100644 --- a/google/resource_cloudfunctions_function_test.go +++ b/google/resource_cloudfunctions_function_test.go @@ -108,11 +108,6 @@ func TestAccCloudFunctionsFunction_update(t *testing.T) { testAccCloudFunctionsFunctionHasLabel("my-label", "my-label-value", &function), ), }, - { - ResourceName: funcResourceName, - ImportState: true, - ImportStateVerify: true, - }, { Config: testAccCloudFunctionsFunction_updated(functionName, bucketName, zipFileUpdatePath), Check: resource.ComposeTestCheckFunc( @@ -132,11 +127,6 @@ func TestAccCloudFunctionsFunction_update(t *testing.T) { "new-env-variable-value", &function), ), }, - { - ResourceName: funcResourceName, - ImportState: true, - ImportStateVerify: true, - }, }, }) } @@ -539,7 +529,6 @@ resource "google_cloudfunctions_function" "function" { source_archive_bucket = "${google_storage_bucket.bucket.name}" source_archive_object = "${google_storage_bucket_object.archive.name}" trigger_http = true - runtime = "nodejs8" timeout = 91 entry_point = "helloGET" labels { @@ -637,7 +626,7 @@ resource "google_cloudfunctions_function" "function" { timeout = 61 entry_point = "helloGCS" event_trigger { - event_type = "google.storage.object.finalize" + event_type = "providers/cloud.storage/eventTypes/object.change" resource = "${google_storage_bucket.bucket.name}" failure_policy { retry = true @@ -667,7 +656,7 @@ resource "google_cloudfunctions_function" "function" { timeout = 61 entry_point = "helloGCS" event_trigger { - event_type = "google.storage.object.finalize" + event_type = "providers/cloud.storage/eventTypes/object.change" resource = "${google_storage_bucket.bucket.name}" } }`, bucketName, zipFilePath, functionName) diff --git a/google/resource_cloudiot_registry.go b/google/resource_cloudiot_registry.go index ae850fcb..a7aa0d06 100644 --- a/google/resource_cloudiot_registry.go +++ b/google/resource_cloudiot_registry.go @@ -76,7 +76,6 @@ func resourceCloudIoTRegistry() *schema.Resource { }, "mqtt_config": &schema.Schema{ Type: schema.TypeMap, - Computed: true, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -91,7 +90,6 @@ func resourceCloudIoTRegistry() *schema.Resource { }, "http_config": &schema.Schema{ Type: schema.TypeMap, - Computed: true, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -235,11 +233,6 @@ func resourceCloudIoTRegistryCreate(d *schema.ResourceData, meta interface{}) er d.SetId("") return err } - - // If we infer project and region, they are never actually set so we set them here - d.Set("project", project) - d.Set("region", region) - return resourceCloudIoTRegistryRead(d, meta) } @@ -324,9 +317,19 @@ func resourceCloudIoTRegistryRead(d *schema.ResourceData, meta interface{}) erro } else { d.Set("state_notification_config", nil) } - - d.Set("mqtt_config", map[string]string{"mqtt_enabled_state": res.MqttConfig.MqttEnabledState}) - d.Set("http_config", map[string]string{"http_enabled_state": res.HttpConfig.HttpEnabledState}) + // If no config exist for mqtt or http config default values are omitted. + mqttState := res.MqttConfig.MqttEnabledState + _, hasMqttConfig := d.GetOk("mqtt_config") + if mqttState != mqttEnabled || hasMqttConfig { + d.Set("mqtt_config", + map[string]string{"mqtt_enabled_state": mqttState}) + } + httpState := res.HttpConfig.HttpEnabledState + _, hasHttpConfig := d.GetOk("http_config") + if httpState != httpEnabled || hasHttpConfig { + d.Set("http_config", + map[string]string{"http_enabled_state": httpState}) + } credentials := make([]map[string]interface{}, len(res.Credentials)) for i, item := range res.Credentials { diff --git a/google/resource_cloudiot_registry_test.go b/google/resource_cloudiot_registry_test.go index 03d81c56..e7e61021 100644 --- a/google/resource_cloudiot_registry_test.go +++ b/google/resource_cloudiot_registry_test.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccCloudIoTRegistry_basic(t *testing.T) { +func TestAccCloudIoTRegistryCreate_basic(t *testing.T) { t.Parallel() registryName := fmt.Sprintf("psregistry-test-%s", acctest.RandString(10)) @@ -26,16 +26,11 @@ func TestAccCloudIoTRegistry_basic(t *testing.T) { "google_cloudiot_registry.foobar"), ), }, - { - ResourceName: "google_cloudiot_registry.foobar", - ImportState: true, - ImportStateVerify: true, - }, }, }) } -func TestAccCloudIoTRegistry_extended(t *testing.T) { +func TestAccCloudIoTRegistryCreate_extended(t *testing.T) { t.Parallel() registryName := fmt.Sprintf("psregistry-test-%s", acctest.RandString(10)) @@ -52,16 +47,11 @@ func TestAccCloudIoTRegistry_extended(t *testing.T) { "google_cloudiot_registry.foobar"), ), }, - { - ResourceName: "google_cloudiot_registry.foobar", - ImportState: true, - ImportStateVerify: true, - }, }, }) } -func TestAccCloudIoTRegistry_update(t *testing.T) { +func TestAccCloudIoTRegistryUpdate(t *testing.T) { t.Parallel() registryName := fmt.Sprintf("psregistry-test-%s", acctest.RandString(10)) @@ -84,11 +74,6 @@ func TestAccCloudIoTRegistry_update(t *testing.T) { resource.TestStep{ Config: testAccCloudIoTRegistry_basic(registryName), }, - { - ResourceName: "google_cloudiot_registry.foobar", - ImportState: true, - ImportStateVerify: true, - }, }, }) } diff --git a/google/resource_composer_environment.go b/google/resource_composer_environment.go index 2bc6e02d..dc220fbe 100644 --- a/google/resource_composer_environment.go +++ b/google/resource_composer_environment.go @@ -46,9 +46,9 @@ func resourceComposerEnvironment() *schema.Resource { Timeouts: &schema.ResourceTimeout{ // Composer takes <= 1 hr for create/update. - Create: schema.DefaultTimeout(60 * time.Minute), - Update: schema.DefaultTimeout(60 * time.Minute), - Delete: schema.DefaultTimeout(15 * time.Minute), + Create: schema.DefaultTimeout(3600 * time.Second), + Update: schema.DefaultTimeout(3600 * time.Second), + Delete: schema.DefaultTimeout(360 * time.Second), }, Schema: map[string]*schema.Schema{ @@ -677,34 +677,10 @@ func expandComposerEnvironmentZone(v interface{}, d *schema.ResourceData, config return getRelativePath(zone) } -func expandComposerEnvironmentMachineType(v interface{}, d *schema.ResourceData, config *Config, nodeCfgZone string) (string, error) { - machineType := v.(string) - requiredZone := GetResourceNameFromSelfLink(nodeCfgZone) - +func expandComposerEnvironmentMachineType(v interface{}, d *schema.ResourceData, config *Config, nodeCfgZone interface{}) (string, error) { fv, err := ParseMachineTypesFieldValue(v.(string), d, config) if err != nil { - if requiredZone == "" { - return "", err - } - - // Try to construct machine type with zone/project given in config. - project, err := getProject(d, config) - if err != nil { - return "", err - } - - fv = &ZonalFieldValue{ - Project: project, - Zone: requiredZone, - Name: GetResourceNameFromSelfLink(machineType), - resourceType: "machineTypes", - } - } - - // Make sure zone in node_config.machineType matches node_config.zone if - // given. - if requiredZone != "" && fv.Zone != requiredZone { - return "", fmt.Errorf("node_config machine_type %q must be in node_config zone %q", machineType, requiredZone) + return "", nil } return fv.RelativeLink(), nil } diff --git a/google/resource_composer_environment_test.go b/google/resource_composer_environment_test.go index 0bc16e78..ccfdaa42 100644 --- a/google/resource_composer_environment_test.go +++ b/google/resource_composer_environment_test.go @@ -4,16 +4,15 @@ import ( "fmt" "testing" - "log" - "strings" - "time" - "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" "google.golang.org/api/composer/v1" "google.golang.org/api/storage/v1" + "log" + "strings" + "time" ) const testComposerEnvironmentPrefix = "tf-cc-testenv" @@ -275,7 +274,6 @@ resource "google_composer_environment" "test" { node_config { network = "${google_compute_network.test.self_link}" subnetwork = "${google_compute_subnetwork.test.self_link}" - zone = "us-central1-a" service_account = "${google_service_account.test.name}" } diff --git a/google/resource_compute_address_generated_test.go b/google/resource_compute_address_generated_test.go index cbe3b9e3..e19f1f3f 100644 --- a/google/resource_compute_address_generated_test.go +++ b/google/resource_compute_address_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeAddress_addressBasicExample(t *testing.T) { @@ -148,25 +147,3 @@ resource "google_compute_instance" "instance_with_ip" { `, val, val, ) } - -func testAccCheckComputeAddressDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_address" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/regions/{{region}}/addresses/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeAddress still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_address_test.go b/google/resource_compute_address_test.go index 30794d28..82b22aa2 100644 --- a/google/resource_compute_address_test.go +++ b/google/resource_compute_address_test.go @@ -6,6 +6,7 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" ) func TestAccComputeAddress_basic(t *testing.T) { @@ -78,6 +79,26 @@ func TestAccComputeAddress_internal(t *testing.T) { }) } +func testAccCheckComputeAddressDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_address" { + continue + } + + addressId, err := parseComputeAddressId(rs.Primary.ID, config) + + _, err = config.clientCompute.Addresses.Get( + config.Project, addressId.Region, addressId.Name).Do() + if err == nil { + return fmt.Errorf("Address still exists") + } + } + + return nil +} + func testAccComputeAddress_basic(i string) string { return fmt.Sprintf(` resource "google_compute_address" "foobar" { diff --git a/google/resource_compute_autoscaler_generated_test.go b/google/resource_compute_autoscaler_generated_test.go index a431e036..ec1f483d 100644 --- a/google/resource_compute_autoscaler_generated_test.go +++ b/google/resource_compute_autoscaler_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeAutoscaler_autoscalerBasicExample(t *testing.T) { @@ -105,25 +104,3 @@ data "google_compute_image" "debian_9" { `, val, val, val, val, ) } - -func testAccCheckComputeAutoscalerDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_autoscaler" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/zones/{{zone}}/autoscalers/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeAutoscaler still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_autoscaler_test.go b/google/resource_compute_autoscaler_test.go index e3434df4..f68abb49 100644 --- a/google/resource_compute_autoscaler_test.go +++ b/google/resource_compute_autoscaler_test.go @@ -104,6 +104,26 @@ func TestAccComputeAutoscaler_multicondition(t *testing.T) { }) } +func testAccCheckComputeAutoscalerDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_autoscaler" { + continue + } + + idParts := strings.Split(rs.Primary.ID, "/") + zone, name := idParts[0], idParts[1] + _, err := config.clientCompute.Autoscalers.Get( + config.Project, zone, name).Do() + if err == nil { + return fmt.Errorf("Autoscaler still exists") + } + } + + return nil +} + func testAccCheckComputeAutoscalerExists(n string, ascaler *compute.Autoscaler) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_backend_bucket_generated_test.go b/google/resource_compute_backend_bucket_generated_test.go index 84462f5a..a657413a 100644 --- a/google/resource_compute_backend_bucket_generated_test.go +++ b/google/resource_compute_backend_bucket_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeBackendBucket_backendBucketBasicExample(t *testing.T) { @@ -59,25 +58,3 @@ resource "google_storage_bucket" "image_bucket" { `, val, val, ) } - -func testAccCheckComputeBackendBucketDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_backend_bucket" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/backendBuckets/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeBackendBucket still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_backend_bucket_test.go b/google/resource_compute_backend_bucket_test.go index ed17495f..fbfc3a95 100644 --- a/google/resource_compute_backend_bucket_test.go +++ b/google/resource_compute_backend_bucket_test.go @@ -78,6 +78,24 @@ func TestAccComputeBackendBucket_basicModified(t *testing.T) { } } +func testAccCheckComputeBackendBucketDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_backend_bucket" { + continue + } + + _, err := config.clientCompute.BackendBuckets.Get( + config.Project, rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("Backend bucket %s still exists", rs.Primary.ID) + } + } + + return nil +} + func testAccCheckComputeBackendBucketExists(n string, svc *compute.BackendBucket) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_disk.go b/google/resource_compute_disk.go index 70177088..63613836 100644 --- a/google/resource_compute_disk.go +++ b/google/resource_compute_disk.go @@ -46,63 +46,6 @@ func isDiskShrinkage(old, new, _ interface{}) bool { return new.(int) < old.(int) } -func customDiffComputeDiskDiskEncryptionKeys(diff *schema.ResourceDiff, meta interface{}) error { - oldConvenience, newConvenience := diff.GetChange("disk_encryption_key_raw") - oldNewField, newNewField := diff.GetChange("disk_encryption_key.0.raw_key") - - // Either field has a value and then has another value - // We need to handle _EVERY_ ForceNew case in this diff - if oldConvenience != "" && newConvenience != "" && oldConvenience != newConvenience { - return diff.ForceNew("disk_encryption_key_raw") - } - - if oldNewField != "" && newNewField != "" && oldNewField != newNewField { - return diff.ForceNew("disk_encryption_key.0.raw_key") - } - - // Our resource isn't using either field, then uses one; - // ForceNew on whichever one is now using it. - if (oldConvenience == "" && oldNewField == "" && newConvenience != "") || (oldConvenience == "" && oldNewField == "" && newNewField != "") { - if oldConvenience == "" && newConvenience != "" { - return diff.ForceNew("disk_encryption_key_raw") - } else { - return diff.ForceNew("disk_encryption_key.0.raw_key") - } - } - - // convenience no longer used - if oldConvenience != "" && newConvenience == "" { - if newNewField == "" { - // convenience is being nulled, and the new field is empty as well - // we've stopped using the field altogether - return diff.ForceNew("disk_encryption_key_raw") - } else if oldConvenience != newNewField { - // convenience is being nulled, and the new field has a new value - // so we ForceNew on either field - return diff.ForceNew("disk_encryption_key_raw") - } else { - // If we reach it here, we're using the same value in the new field as we had in the convenience field - } - } - - // new no longer used - if oldNewField != "" && newNewField == "" { - if newConvenience == "" { - // new field is being nulled, and the convenience field is empty as well - // we've stopped using the field altogether - return diff.ForceNew("disk_encryption_key.0.raw_key") - } else if newConvenience != oldNewField { - // new is being nulled, and the convenience field has a new value - // so we ForceNew on either field - return diff.ForceNew("disk_encryption_key.0.raw_key") - } else { - // If we reach it here, we're using the same value in the convenience field as we had in the new field - } - } - - return nil -} - // We cannot suppress the diff for the case when family name is not part of the image name since we can't // make a network call in a DiffSuppressFunc. func diskImageDiffSuppress(_, old, new string, _ *schema.ResourceData) bool { @@ -289,6 +232,26 @@ func suppressWindowsFamilyDiff(imageName, familyName string) bool { return false } +func diskEncryptionKeyDiffSuppress(k, old, new string, d *schema.ResourceData) bool { + if strings.HasSuffix(k, "#") { + if old == "1" && new == "0" { + // If we have a disk_encryption_key_raw, we can trust that the diff will be handled there + // and we don't need to worry about it here. + return d.Get("disk_encryption_key_raw").(string) != "" + } else if new == "1" && old == "0" { + // This will be handled by diffing the 'raw_key' attribute. + return true + } + } else if strings.HasSuffix(k, "raw_key") { + disk_key := d.Get("disk_encryption_key_raw").(string) + return disk_key == old && old != "" && new == "" + } else if k == "disk_encryption_key_raw" { + disk_key := d.Get("disk_encryption_key.0.raw_key").(string) + return disk_key == old && old != "" && new == "" + } + return false +} + func resourceComputeDisk() *schema.Resource { return &schema.Resource{ Create: resourceComputeDiskCreate, @@ -306,9 +269,7 @@ func resourceComputeDisk() *schema.Resource { Delete: schema.DefaultTimeout(240 * time.Second), }, CustomizeDiff: customdiff.All( - customdiff.ForceNewIfChange("size", isDiskShrinkage), - customDiffComputeDiskDiskEncryptionKeys, - ), + customdiff.ForceNewIfChange("size", isDiskShrinkage)), Schema: map[string]*schema.Schema{ "name": { @@ -322,11 +283,11 @@ func resourceComputeDisk() *schema.Resource { ForceNew: true, }, "disk_encryption_key": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - Computed: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + ForceNew: true, + DiffSuppressFunc: diskEncryptionKeyDiffSuppress, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "raw_key": { @@ -448,10 +409,12 @@ func resourceComputeDisk() *schema.Resource { }, }, "disk_encryption_key_raw": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Sensitive: true, - Deprecated: "Use disk_encryption_key.raw_key instead.", + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Sensitive: true, + DiffSuppressFunc: diskEncryptionKeyDiffSuppress, + Deprecated: "Use disk_encryption_key.raw_key instead.", }, "disk_encryption_key_sha256": &schema.Schema{ @@ -1212,6 +1175,25 @@ func resourceComputeDiskEncoder(d *schema.ResourceData, meta interface{}, obj ma log.Printf("[DEBUG] Image name resolved to: %s", imageUrl) } + if v, ok := d.GetOk("snapshot"); ok { + snapshotName := v.(string) + match, _ := regexp.MatchString("^https://www.googleapis.com/compute", snapshotName) + if match { + obj["sourceSnapshot"] = snapshotName + } else { + log.Printf("[DEBUG] Loading snapshot: %s", snapshotName) + snapshotData, err := config.clientCompute.Snapshots.Get( + project, snapshotName).Do() + + if err != nil { + return nil, fmt.Errorf( + "Error loading snapshot '%s': %s", + snapshotName, err) + } + obj["sourceSnapshot"] = snapshotData.SelfLink + } + } + return obj, nil } diff --git a/google/resource_compute_disk_test.go b/google/resource_compute_disk_test.go index ff2ea6e2..e0a39731 100644 --- a/google/resource_compute_disk_test.go +++ b/google/resource_compute_disk_test.go @@ -318,7 +318,7 @@ func TestAccComputeDisk_fromSnapshot(t *testing.T) { }) } -func TestAccComputeDisk_encryptionBasic(t *testing.T) { +func TestAccComputeDisk_encryption(t *testing.T) { t.Parallel() diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) @@ -338,57 +338,9 @@ func TestAccComputeDisk_encryptionBasic(t *testing.T) { "google_compute_disk.foobar", &disk), ), }, - }, - }) -} - -func TestAccComputeDisk_encryptionOld(t *testing.T) { - t.Parallel() - - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var disk compute.Disk - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeDiskDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeDisk_encryptionOld(diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeDiskExists( - "google_compute_disk.foobar", &disk), - testAccCheckEncryptionKey( - "google_compute_disk.foobar", &disk), - ), - }, - }, - }) -} - -func TestAccComputeDisk_encryptionUpgrade(t *testing.T) { - t.Parallel() - - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var disk compute.Disk - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeDiskDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeDisk_encryptionOld(diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeDiskExists( - "google_compute_disk.foobar", &disk), - testAccCheckEncryptionKey( - "google_compute_disk.foobar", &disk), - ), - }, // Update from top-level attribute to nested. resource.TestStep{ - Config: testAccComputeDisk_encryption(diskName), + Config: testAccComputeDisk_encryptionMigrate(diskName), Check: resource.ComposeTestCheckFunc( testAccCheckComputeDiskExists( "google_compute_disk.foobar", &disk), @@ -396,21 +348,7 @@ func TestAccComputeDisk_encryptionUpgrade(t *testing.T) { "google_compute_disk.foobar", &disk), ), }, - }, - }) -} - -func TestAccComputeDisk_encryptionDowngrade(t *testing.T) { - t.Parallel() - - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var disk compute.Disk - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeDiskDestroy, - Steps: []resource.TestStep{ + // Update from nested attribute back to top-level. resource.TestStep{ Config: testAccComputeDisk_encryption(diskName), Check: resource.ComposeTestCheckFunc( @@ -420,81 +358,6 @@ func TestAccComputeDisk_encryptionDowngrade(t *testing.T) { "google_compute_disk.foobar", &disk), ), }, - resource.TestStep{ - Config: testAccComputeDisk_encryptionOld(diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeDiskExists( - "google_compute_disk.foobar", &disk), - testAccCheckEncryptionKey( - "google_compute_disk.foobar", &disk), - ), - }, - }, - }) -} - -func TestAccComputeDisk_encryptionChange(t *testing.T) { - t.Parallel() - - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var disk compute.Disk - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeDiskDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeDisk_encryption(diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeDiskExists( - "google_compute_disk.foobar", &disk), - testAccCheckEncryptionKey( - "google_compute_disk.foobar", &disk), - ), - }, - resource.TestStep{ - Config: testAccComputeDisk_encryptionDelta(diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeDiskExists( - "google_compute_disk.foobar", &disk), - testAccCheckEncryptionKey( - "google_compute_disk.foobar", &disk), - ), - }, - }, - }) -} - -func TestAccComputeDisk_encryptionOldChange(t *testing.T) { - t.Parallel() - - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var disk compute.Disk - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeDiskDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeDisk_encryptionOld(diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeDiskExists( - "google_compute_disk.foobar", &disk), - testAccCheckEncryptionKey( - "google_compute_disk.foobar", &disk), - ), - }, - resource.TestStep{ - Config: testAccComputeDisk_encryptionOldDelta(diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeDiskExists( - "google_compute_disk.foobar", &disk), - testAccCheckEncryptionKey( - "google_compute_disk.foobar", &disk), - ), - }, }, }) } @@ -708,15 +571,11 @@ func testAccCheckEncryptionKey(n string, disk *compute.Disk) resource.TestCheckF return fmt.Errorf("Not found: %s", n) } - oldAttr := rs.Primary.Attributes["disk_encryption_key_sha256"] - attr := rs.Primary.Attributes["disk_encryption_key.0.sha256"] + attr := rs.Primary.Attributes["disk_encryption_key_sha256"] if disk.DiskEncryptionKey == nil { return fmt.Errorf("Disk %s has mismatched encryption key.\nTF State: %+v\nGCP State: ", n, attr) - } else if oldAttr != disk.DiskEncryptionKey.Sha256 && attr == "" { - return fmt.Errorf("Disk %s has mismatched encryption key.\nTF State (old attr): %+v.\nGCP State: %+v", - n, oldAttr, disk.DiskEncryptionKey.Sha256) } else if attr != disk.DiskEncryptionKey.Sha256 { - return fmt.Errorf("Disk %s has mismatched encryption key.\nTF State (new attr): %+v.\nGCP State: %+v", + return fmt.Errorf("Disk %s has mismatched encryption key.\nTF State: %+v.\nGCP State: %+v", n, attr, disk.DiskEncryptionKey.Sha256) } return nil @@ -842,25 +701,6 @@ data "google_compute_image" "my_image" { project = "debian-cloud" } -resource "google_compute_disk" "foobar" { - name = "%s" - image = "${data.google_compute_image.my_image.self_link}" - size = 50 - type = "pd-ssd" - zone = "us-central1-a" - disk_encryption_key { - raw_key = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" - } -}`, diskName) -} - -func testAccComputeDisk_encryptionOld(diskName string) string { - return fmt.Sprintf(` -data "google_compute_image" "my_image" { - family = "debian-9" - project = "debian-cloud" -} - resource "google_compute_disk" "foobar" { name = "%s" image = "${data.google_compute_image.my_image.self_link}" @@ -871,7 +711,7 @@ resource "google_compute_disk" "foobar" { }`, diskName) } -func testAccComputeDisk_encryptionDelta(diskName string) string { +func testAccComputeDisk_encryptionMigrate(diskName string) string { return fmt.Sprintf(` data "google_compute_image" "my_image" { family = "debian-9" @@ -885,28 +725,11 @@ resource "google_compute_disk" "foobar" { type = "pd-ssd" zone = "us-central1-a" disk_encryption_key { - raw_key = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" + raw_key = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" } }`, diskName) } -func testAccComputeDisk_encryptionOldDelta(diskName string) string { - return fmt.Sprintf(` -data "google_compute_image" "my_image" { - family = "debian-9" - project = "debian-cloud" -} - -resource "google_compute_disk" "foobar" { - name = "%s" - image = "${data.google_compute_image.my_image.self_link}" - size = 50 - type = "pd-ssd" - zone = "us-central1-a" - disk_encryption_key_raw = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" -}`, diskName) -} - func testAccComputeDisk_deleteDetach(instanceName, diskName string) string { return fmt.Sprintf(` data "google_compute_image" "my_image" { diff --git a/google/resource_compute_firewall_generated_test.go b/google/resource_compute_firewall_generated_test.go index 6266a3d1..e2e5949b 100644 --- a/google/resource_compute_firewall_generated_test.go +++ b/google/resource_compute_firewall_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeFirewall_firewallBasicExample(t *testing.T) { @@ -67,25 +66,3 @@ resource "google_compute_network" "default" { `, val, val, ) } - -func testAccCheckComputeFirewallDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_firewall" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/firewalls/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeFirewall still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_firewall_test.go b/google/resource_compute_firewall_test.go index 834aea0d..3b4fb766 100644 --- a/google/resource_compute_firewall_test.go +++ b/google/resource_compute_firewall_test.go @@ -283,6 +283,66 @@ func TestAccComputeFirewall_disabled(t *testing.T) { }) } +func TestAccComputeFirewall_enableLogging(t *testing.T) { + t.Parallel() + + var firewall computeBeta.Firewall + networkName := fmt.Sprintf("firewall-test-%s", acctest.RandString(10)) + firewallName := fmt.Sprintf("firewall-test-%s", acctest.RandString(10)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckComputeFirewallDestroy, + Steps: []resource.TestStep{ + { + Config: testAccComputeFirewall_enableLogging(networkName, firewallName, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckComputeBetaFirewallExists("google_compute_firewall.foobar", &firewall), + testAccCheckComputeFirewallLoggingEnabled(&firewall, false), + ), + }, + { + ResourceName: "google_compute_firewall.foobar", + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccComputeFirewall_enableLogging(networkName, firewallName, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckComputeBetaFirewallExists("google_compute_firewall.foobar", &firewall), + testAccCheckComputeFirewallLoggingEnabled(&firewall, true), + ), + }, + { + Config: testAccComputeFirewall_enableLogging(networkName, firewallName, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckComputeBetaFirewallExists("google_compute_firewall.foobar", &firewall), + testAccCheckComputeFirewallLoggingEnabled(&firewall, false), + ), + }, + }, + }) +} + +func testAccCheckComputeFirewallDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_firewall" { + continue + } + + _, err := config.clientCompute.Firewalls.Get( + config.Project, rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("Firewall still exists") + } + } + + return nil +} + func testAccCheckComputeFirewallExists(n string, firewall *compute.Firewall) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -609,3 +669,29 @@ func testAccComputeFirewall_disabled(network, firewall string) string { disabled = true }`, network, firewall) } + +func testAccComputeFirewall_enableLogging(network, firewall string, enableLogging bool) string { + enableLoggingCfg := "" + if enableLogging { + enableLoggingCfg = "enable_logging= true" + } + return fmt.Sprintf(` + resource "google_compute_network" "foobar" { + name = "%s" + auto_create_subnetworks = false + ipv4_range = "10.0.0.0/16" + } + + resource "google_compute_firewall" "foobar" { + name = "firewall-test-%s" + description = "Resource created for Terraform acceptance testing" + network = "${google_compute_network.foobar.name}" + source_tags = ["foo"] + + allow { + protocol = "icmp" + } + + %s + }`, network, firewall, enableLoggingCfg) +} diff --git a/google/resource_compute_forwarding_rule_generated_test.go b/google/resource_compute_forwarding_rule_generated_test.go index 91ce039a..91b5c221 100644 --- a/google/resource_compute_forwarding_rule_generated_test.go +++ b/google/resource_compute_forwarding_rule_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeForwardingRule_forwardingRuleBasicExample(t *testing.T) { @@ -57,25 +56,3 @@ resource "google_compute_target_pool" "default" { `, val, val, ) } - -func testAccCheckComputeForwardingRuleDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_forwarding_rule" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/regions/{{region}}/forwardingRules/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeForwardingRule still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_forwarding_rule_test.go b/google/resource_compute_forwarding_rule_test.go index 1e5d5b87..bc936e08 100644 --- a/google/resource_compute_forwarding_rule_test.go +++ b/google/resource_compute_forwarding_rule_test.go @@ -6,6 +6,7 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" ) func TestAccComputeForwardingRule_update(t *testing.T) { @@ -141,6 +142,24 @@ func TestAccComputeForwardingRule_networkTier(t *testing.T) { }) } +func testAccCheckComputeForwardingRuleDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_forwarding_rule" { + continue + } + + _, err := config.clientCompute.ForwardingRules.Get( + config.Project, config.Region, rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("ForwardingRule still exists") + } + } + + return nil +} + func testAccComputeForwardingRule_basic(poolName, ruleName string) string { return fmt.Sprintf(` resource "google_compute_target_pool" "foo-tp" { diff --git a/google/resource_compute_global_address_generated_test.go b/google/resource_compute_global_address_generated_test.go index 18510ad2..6091c3a3 100644 --- a/google/resource_compute_global_address_generated_test.go +++ b/google/resource_compute_global_address_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeGlobalAddress_globalAddressBasicExample(t *testing.T) { @@ -51,25 +50,3 @@ resource "google_compute_global_address" "default" { `, val, ) } - -func testAccCheckComputeGlobalAddressDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_global_address" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/addresses/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeGlobalAddress still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_global_address_test.go b/google/resource_compute_global_address_test.go index cb24152b..7d78c2ce 100644 --- a/google/resource_compute_global_address_test.go +++ b/google/resource_compute_global_address_test.go @@ -87,6 +87,24 @@ func TestAccComputeGlobalAddress_internal(t *testing.T) { }) } +func testAccCheckComputeGlobalAddressDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_global_address" { + continue + } + + _, err := config.clientCompute.GlobalAddresses.Get( + config.Project, rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("Address still exists") + } + } + + return nil +} + func testAccCheckComputeGlobalAddressExists(n string, addr *compute.Address) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_health_check.go b/google/resource_compute_health_check.go index 861ac22d..ff62218f 100644 --- a/google/resource_compute_health_check.go +++ b/google/resource_compute_health_check.go @@ -89,10 +89,6 @@ func resourceComputeHealthCheck() *schema.Resource { Optional: true, Default: "/", }, - "response": { - Type: schema.TypeString, - Optional: true, - }, }, }, ConflictsWith: []string{"https_health_check", "tcp_health_check", "ssl_health_check"}, @@ -123,10 +119,6 @@ func resourceComputeHealthCheck() *schema.Resource { Optional: true, Default: "/", }, - "response": { - Type: schema.TypeString, - Optional: true, - }, }, }, ConflictsWith: []string{"http_health_check", "tcp_health_check", "ssl_health_check"}, @@ -614,8 +606,6 @@ func flattenComputeHealthCheckHttpHealthCheck(v interface{}) interface{} { flattenComputeHealthCheckHttpHealthCheckHost(original["host"]) transformed["request_path"] = flattenComputeHealthCheckHttpHealthCheckRequestPath(original["requestPath"]) - transformed["response"] = - flattenComputeHealthCheckHttpHealthCheckResponse(original["response"]) transformed["port"] = flattenComputeHealthCheckHttpHealthCheckPort(original["port"]) transformed["proxy_header"] = @@ -630,10 +620,6 @@ func flattenComputeHealthCheckHttpHealthCheckRequestPath(v interface{}) interfac return v } -func flattenComputeHealthCheckHttpHealthCheckResponse(v interface{}) interface{} { - return v -} - func flattenComputeHealthCheckHttpHealthCheckPort(v interface{}) interface{} { // Handles the string fixed64 format if strVal, ok := v.(string); ok { @@ -658,8 +644,6 @@ func flattenComputeHealthCheckHttpsHealthCheck(v interface{}) interface{} { flattenComputeHealthCheckHttpsHealthCheckHost(original["host"]) transformed["request_path"] = flattenComputeHealthCheckHttpsHealthCheckRequestPath(original["requestPath"]) - transformed["response"] = - flattenComputeHealthCheckHttpsHealthCheckResponse(original["response"]) transformed["port"] = flattenComputeHealthCheckHttpsHealthCheckPort(original["port"]) transformed["proxy_header"] = @@ -674,10 +658,6 @@ func flattenComputeHealthCheckHttpsHealthCheckRequestPath(v interface{}) interfa return v } -func flattenComputeHealthCheckHttpsHealthCheckResponse(v interface{}) interface{} { - return v -} - func flattenComputeHealthCheckHttpsHealthCheckPort(v interface{}) interface{} { // Handles the string fixed64 format if strVal, ok := v.(string); ok { @@ -815,13 +795,6 @@ func expandComputeHealthCheckHttpHealthCheck(v interface{}, d *schema.ResourceDa transformed["requestPath"] = transformedRequestPath } - transformedResponse, err := expandComputeHealthCheckHttpHealthCheckResponse(original["response"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedResponse); val.IsValid() && !isEmptyValue(val) { - transformed["response"] = transformedResponse - } - transformedPort, err := expandComputeHealthCheckHttpHealthCheckPort(original["port"], d, config) if err != nil { return nil, err @@ -847,10 +820,6 @@ func expandComputeHealthCheckHttpHealthCheckRequestPath(v interface{}, d *schema return v, nil } -func expandComputeHealthCheckHttpHealthCheckResponse(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - func expandComputeHealthCheckHttpHealthCheckPort(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { return v, nil } @@ -882,13 +851,6 @@ func expandComputeHealthCheckHttpsHealthCheck(v interface{}, d *schema.ResourceD transformed["requestPath"] = transformedRequestPath } - transformedResponse, err := expandComputeHealthCheckHttpsHealthCheckResponse(original["response"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedResponse); val.IsValid() && !isEmptyValue(val) { - transformed["response"] = transformedResponse - } - transformedPort, err := expandComputeHealthCheckHttpsHealthCheckPort(original["port"], d, config) if err != nil { return nil, err @@ -914,10 +876,6 @@ func expandComputeHealthCheckHttpsHealthCheckRequestPath(v interface{}, d *schem return v, nil } -func expandComputeHealthCheckHttpsHealthCheckResponse(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - func expandComputeHealthCheckHttpsHealthCheckPort(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { return v, nil } diff --git a/google/resource_compute_health_check_generated_test.go b/google/resource_compute_health_check_generated_test.go index 88ca0c14..05232827 100644 --- a/google/resource_compute_health_check_generated_test.go +++ b/google/resource_compute_health_check_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeHealthCheck_healthCheckBasicExample(t *testing.T) { @@ -58,25 +57,3 @@ resource "google_compute_health_check" "internal-health-check" { `, val, ) } - -func testAccCheckComputeHealthCheckDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_health_check" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/healthChecks/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeHealthCheck still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_health_check_test.go b/google/resource_compute_health_check_test.go index adca744a..17b4a7be 100644 --- a/google/resource_compute_health_check_test.go +++ b/google/resource_compute_health_check_test.go @@ -215,6 +215,24 @@ func TestAccComputeHealthCheck_tcpAndSsl_shouldFail(t *testing.T) { }) } +func testAccCheckComputeHealthCheckDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_health_check" { + continue + } + + _, err := config.clientCompute.HealthChecks.Get( + config.Project, rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("HealthCheck %s still exists", rs.Primary.ID) + } + } + + return nil +} + func testAccCheckComputeHealthCheckExists(n string, healthCheck *compute.HealthCheck) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_http_health_check_generated_test.go b/google/resource_compute_http_health_check_generated_test.go index 7bb291a8..c547eefe 100644 --- a/google/resource_compute_http_health_check_generated_test.go +++ b/google/resource_compute_http_health_check_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeHttpHealthCheck_httpHealthCheckBasicExample(t *testing.T) { @@ -55,25 +54,3 @@ resource "google_compute_http_health_check" "default" { `, val, ) } - -func testAccCheckComputeHttpHealthCheckDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_http_health_check" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/httpHealthChecks/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeHttpHealthCheck still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_http_health_check_test.go b/google/resource_compute_http_health_check_test.go index 6586848c..cf12e72b 100644 --- a/google/resource_compute_http_health_check_test.go +++ b/google/resource_compute_http_health_check_test.go @@ -80,6 +80,24 @@ func TestAccComputeHttpHealthCheck_update(t *testing.T) { }) } +func testAccCheckComputeHttpHealthCheckDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_http_health_check" { + continue + } + + _, err := config.clientCompute.HttpHealthChecks.Get( + config.Project, rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("HttpHealthCheck still exists") + } + } + + return nil +} + func testAccCheckComputeHttpHealthCheckExists(n string, healthCheck *compute.HttpHealthCheck) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_https_health_check_generated_test.go b/google/resource_compute_https_health_check_generated_test.go index 0cc50d17..eaf0747d 100644 --- a/google/resource_compute_https_health_check_generated_test.go +++ b/google/resource_compute_https_health_check_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeHttpsHealthCheck_httpsHealthCheckBasicExample(t *testing.T) { @@ -55,25 +54,3 @@ resource "google_compute_https_health_check" "default" { `, val, ) } - -func testAccCheckComputeHttpsHealthCheckDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_https_health_check" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/httpsHealthChecks/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeHttpsHealthCheck still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_https_health_check_test.go b/google/resource_compute_https_health_check_test.go index 8cfbf4c2..ee32427f 100644 --- a/google/resource_compute_https_health_check_test.go +++ b/google/resource_compute_https_health_check_test.go @@ -80,6 +80,24 @@ func TestAccComputeHttpsHealthCheck_update(t *testing.T) { }) } +func testAccCheckComputeHttpsHealthCheckDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_https_health_check" { + continue + } + + _, err := config.clientCompute.HttpsHealthChecks.Get( + config.Project, rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("HttpsHealthCheck still exists") + } + } + + return nil +} + func testAccCheckComputeHttpsHealthCheckExists(n string, healthCheck *compute.HttpsHealthCheck) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_instance_group_manager.go b/google/resource_compute_instance_group_manager.go index 6cab4786..b7b71179 100644 --- a/google/resource_compute_instance_group_manager.go +++ b/google/resource_compute_instance_group_manager.go @@ -426,14 +426,9 @@ func resourceComputeInstanceGroupManagerRead(d *schema.ResourceData, meta interf } manager, err := getManager(d, meta) - if err != nil { + if err != nil || manager == nil { return err } - if manager == nil { - log.Printf("[WARN] Instance Group Manager %q not found, removing from state.", d.Id()) - d.SetId("") - return nil - } d.Set("base_instance_name", manager.BaseInstanceName) d.Set("instance_template", ConvertSelfLinkToV1(manager.InstanceTemplate)) @@ -445,24 +440,17 @@ func resourceComputeInstanceGroupManagerRead(d *schema.ResourceData, meta interf d.Set("description", manager.Description) d.Set("project", project) d.Set("target_size", manager.TargetSize) - if err = d.Set("target_pools", manager.TargetPools); err != nil { - return fmt.Errorf("Error setting target_pools in state: %s", err.Error()) - } - if err = d.Set("named_port", flattenNamedPortsBeta(manager.NamedPorts)); err != nil { - return fmt.Errorf("Error setting named_port in state: %s", err.Error()) - } + d.Set("target_pools", manager.TargetPools) + d.Set("named_port", flattenNamedPortsBeta(manager.NamedPorts)) d.Set("fingerprint", manager.Fingerprint) d.Set("instance_group", ConvertSelfLinkToV1(manager.InstanceGroup)) d.Set("self_link", ConvertSelfLinkToV1(manager.SelfLink)) - update_strategy, ok := d.GetOk("update_strategy") if !ok { update_strategy = "REPLACE" } d.Set("update_strategy", update_strategy.(string)) - if err = d.Set("auto_healing_policies", flattenAutoHealingPolicies(manager.AutoHealingPolicies)); err != nil { - return fmt.Errorf("Error setting auto_healing_policies in state: %s", err.Error()) - } + d.Set("auto_healing_policies", flattenAutoHealingPolicies(manager.AutoHealingPolicies)) if d.Get("wait_for_instances").(bool) { conf := resource.StateChangeConf{ diff --git a/google/resource_compute_instance_group_manager_test.go b/google/resource_compute_instance_group_manager_test.go index bd334e53..ef3d10e9 100644 --- a/google/resource_compute_instance_group_manager_test.go +++ b/google/resource_compute_instance_group_manager_test.go @@ -199,7 +199,7 @@ func TestAccInstanceGroupManager_rollingUpdatePolicy(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckInstanceGroupManagerDestroy, Steps: []resource.TestStep{ - { + resource.TestStep{ Config: testAccInstanceGroupManager_rollingUpdatePolicy(igm), Check: resource.ComposeTestCheckFunc( testAccCheckInstanceGroupManagerBetaExists( @@ -218,7 +218,7 @@ func TestAccInstanceGroupManager_rollingUpdatePolicy(t *testing.T) { "google_compute_instance_group_manager.igm-rolling-update-policy", "rolling_update_policy.0.min_ready_sec", "20"), ), }, - { + resource.TestStep{ Config: testAccInstanceGroupManager_rollingUpdatePolicy2(igm), Check: resource.ComposeTestCheckFunc( testAccCheckInstanceGroupManagerBetaExists( diff --git a/google/resource_compute_instance_template.go b/google/resource_compute_instance_template.go index a28133f2..854616fd 100644 --- a/google/resource_compute_instance_template.go +++ b/google/resource_compute_instance_template.go @@ -131,23 +131,6 @@ func resourceComputeInstanceTemplate() *schema.Resource { ForceNew: true, Computed: true, }, - - "disk_encryption_key": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "kms_key_self_link": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - DiffSuppressFunc: compareSelfLinkRelativePaths, - }, - }, - }, - }, }, }, }, @@ -216,18 +199,18 @@ func resourceComputeInstanceTemplate() *schema.Resource { }, "address": &schema.Schema{ - Type: schema.TypeString, - Computed: true, // Computed because it is set if network_ip is set. - Optional: true, - ForceNew: true, - Deprecated: "Please use network_ip", + Type: schema.TypeString, + Computed: true, // Computed because it is set if network_ip is set. + Optional: true, + ForceNew: true, }, "network_ip": &schema.Schema{ - Type: schema.TypeString, - Computed: true, // Computed because it is set if address is set. - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Computed: true, // Computed because it is set if address is set. + Optional: true, + ForceNew: true, + Deprecated: "Please use address", }, "subnetwork": &schema.Schema{ @@ -517,13 +500,6 @@ func buildDisks(d *schema.ResourceData, config *Config) ([]*computeBeta.Attached disk.DeviceName = v.(string) } - if _, ok := d.GetOk(prefix + ".disk_encryption_key"); ok { - disk.DiskEncryptionKey = &computeBeta.CustomerEncryptionKey{} - if v, ok := d.GetOk(prefix + ".disk_encryption_key.0.kms_key_self_link"); ok { - disk.DiskEncryptionKey.KmsKeyName = v.(string) - } - } - if v, ok := d.GetOk(prefix + ".source"); ok { disk.Source = v.(string) } else { @@ -730,14 +706,6 @@ func flattenDisks(disks []*computeBeta.AttachedDisk, d *schema.ResourceData, def diskMap["disk_name"] = disk.InitializeParams.DiskName diskMap["disk_size_gb"] = disk.InitializeParams.DiskSizeGb } - - if disk.DiskEncryptionKey != nil { - encryption := make([]map[string]interface{}, 1) - encryption[0] = make(map[string]interface{}) - encryption[0]["kms_key_self_link"] = disk.DiskEncryptionKey.KmsKeyName - diskMap["disk_encryption_key"] = encryption - } - diskMap["auto_delete"] = disk.AutoDelete diskMap["boot"] = disk.Boot diskMap["device_name"] = disk.DeviceName diff --git a/google/resource_compute_instance_template_test.go b/google/resource_compute_instance_template_test.go index 6c1f177e..f15c36fb 100644 --- a/google/resource_compute_instance_template_test.go +++ b/google/resource_compute_instance_template_test.go @@ -472,38 +472,6 @@ func TestAccComputeInstanceTemplate_minCpuPlatform(t *testing.T) { }) } -func TestAccComputeInstanceTemplate_EncryptKMS(t *testing.T) { - t.Parallel() - - var instanceTemplate compute.InstanceTemplate - - org := getTestOrgFromEnv(t) - pid := "tf-test-" + acctest.RandString(10) - billingAccount := getTestBillingAccountFromEnv(t) - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - keyRingName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - keyName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeInstanceTemplateDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeInstanceTemplate_encryptionKMS(pid, pname, org, billingAccount, diskName, keyRingName, keyName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeInstanceTemplateExists("google_compute_instance_template.foobar", &instanceTemplate), - ), - }, - resource.TestStep{ - ResourceName: "google_compute_instance_template.foobar", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - func testAccCheckComputeInstanceTemplateDestroy(s *terraform.State) error { config := testAccProvider.Meta().(*Config) @@ -1422,87 +1390,3 @@ resource "google_compute_instance_template" "foobar" { min_cpu_platform = "%s" }`, i, DEFAULT_MIN_CPU_TEST_VALUE) } - -func testAccComputeInstanceTemplate_encryptionKMS(pid, pname, org, billing, diskName, keyRingName, keyName string) string { - return fmt.Sprintf(` -resource "google_project" "project" { - project_id = "%s" - name = "%s" - org_id = "%s" - billing_account = "%s" -} - -data "google_compute_image" "my_image" { - family = "debian-9" - project = "debian-cloud" -} - -resource "google_project_services" "apis" { - project = "${google_project.project.project_id}" - - services = [ - "oslogin.googleapis.com", - "compute.googleapis.com", - "cloudkms.googleapis.com", - "appengine.googleapis.com", - ] -} - -resource "google_project_iam_member" "kms-project-binding" { - project = "${google_project.project.project_id}" - role = "roles/cloudkms.cryptoKeyEncrypterDecrypter" - member = "serviceAccount:service-${google_project.project.number}@compute-system.iam.gserviceaccount.com" - - depends_on = ["google_project_services.apis"] -} - -resource "google_kms_crypto_key_iam_binding" "kms-key-binding" { - crypto_key_id = "${google_kms_crypto_key.my_crypto_key.self_link}" - role = "roles/cloudkms.cryptoKeyEncrypterDecrypter" - - members = [ - "serviceAccount:service-${google_project.project.number}@compute-system.iam.gserviceaccount.com", - ] - - depends_on = ["google_project_services.apis"] -} - -resource "google_kms_key_ring" "my_key_ring" { - name = "%s" - project = "${google_project.project.project_id}" - location = "us-central1" - - depends_on = ["google_project_services.apis"] -} - -resource "google_kms_crypto_key" "my_crypto_key" { - name = "%s" - key_ring = "${google_kms_key_ring.my_key_ring.self_link}" -} - - -resource "google_compute_instance_template" "foobar" { - name = "instancet-test-%s" - machine_type = "n1-standard-1" - can_ip_forward = false - - disk { - source_image = "${data.google_compute_image.my_image.self_link}" - disk_encryption_key { - kms_key_self_link = "${google_kms_crypto_key.my_crypto_key.self_link}" - } - } - - network_interface { - network = "default" - } - - service_account { - scopes = ["userinfo-email", "compute-ro", "storage-ro"] - } - - labels { - my_label = "foobar" - } -}`, pid, pname, org, billing, keyRingName, keyName, acctest.RandString(10)) -} diff --git a/google/resource_compute_project_metadata.go b/google/resource_compute_project_metadata.go index f21e6f23..2335750f 100644 --- a/google/resource_compute_project_metadata.go +++ b/google/resource_compute_project_metadata.go @@ -14,9 +14,6 @@ func resourceComputeProjectMetadata() *schema.Resource { Read: resourceComputeProjectMetadataRead, Update: resourceComputeProjectMetadataUpdate, Delete: resourceComputeProjectMetadataDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, SchemaVersion: 0, @@ -94,30 +91,24 @@ func resourceComputeProjectMetadataCreate(d *schema.ResourceData, meta interface func resourceComputeProjectMetadataRead(d *schema.ResourceData, meta interface{}) error { config := meta.(*Config) - if d.Id() == "" { - projectID, err := getProject(d, config) - if err != nil { - return err - } - d.SetId(projectID) + projectID, err := getProject(d, config) + if err != nil { + return err } // Load project service - log.Printf("[DEBUG] Loading project service: %s", d.Id()) - project, err := config.clientCompute.Projects.Get(d.Id()).Do() + log.Printf("[DEBUG] Loading project service: %s", projectID) + project, err := config.clientCompute.Projects.Get(projectID).Do() if err != nil { - return handleNotFoundError(err, d, fmt.Sprintf("Project metadata for project %q", d.Id())) + return handleNotFoundError(err, d, fmt.Sprintf("Project metadata for project %q", projectID)) } md := flattenMetadata(project.CommonInstanceMetadata) existingMetadata := d.Get("metadata").(map[string]interface{}) // Remove all keys not explicitly mentioned in the terraform config - // unless you're doing an import. - if len(existingMetadata) > 0 { - for k := range md { - if _, ok := existingMetadata[k]; !ok { - delete(md, k) - } + for k := range md { + if _, ok := existingMetadata[k]; !ok { + delete(md, k) } } @@ -125,8 +116,9 @@ func resourceComputeProjectMetadataRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("Error setting metadata: %s", err) } - d.Set("project", project.Name) - d.SetId(project.Name) + d.Set("project", projectID) + d.SetId("common_metadata") + return nil } diff --git a/google/resource_compute_project_metadata_item.go b/google/resource_compute_project_metadata_item.go index 66b0940c..e3d2a607 100644 --- a/google/resource_compute_project_metadata_item.go +++ b/google/resource_compute_project_metadata_item.go @@ -3,7 +3,6 @@ package google import ( "fmt" "log" - "time" "github.com/hashicorp/terraform/helper/schema" "google.golang.org/api/compute/v1" @@ -36,12 +35,6 @@ func resourceComputeProjectMetadataItem() *schema.Resource { ForceNew: true, }, }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(5 * time.Minute), - Update: schema.DefaultTimeout(5 * time.Minute), - Delete: schema.DefaultTimeout(5 * time.Minute), - }, } } @@ -56,7 +49,7 @@ func resourceComputeProjectMetadataItemCreate(d *schema.ResourceData, meta inter key := d.Get("key").(string) val := d.Get("value").(string) - err = updateComputeCommonInstanceMetadata(config, projectID, key, &val, int(d.Timeout(schema.TimeoutCreate).Minutes())) + err = updateComputeCommonInstanceMetadata(config, projectID, key, &val) if err != nil { return err } @@ -108,7 +101,7 @@ func resourceComputeProjectMetadataItemUpdate(d *schema.ResourceData, meta inter _, n := d.GetChange("value") new := n.(string) - err = updateComputeCommonInstanceMetadata(config, projectID, key, &new, int(d.Timeout(schema.TimeoutUpdate).Minutes())) + err = updateComputeCommonInstanceMetadata(config, projectID, key, &new) if err != nil { return err } @@ -126,7 +119,7 @@ func resourceComputeProjectMetadataItemDelete(d *schema.ResourceData, meta inter key := d.Get("key").(string) - err = updateComputeCommonInstanceMetadata(config, projectID, key, nil, int(d.Timeout(schema.TimeoutDelete).Minutes())) + err = updateComputeCommonInstanceMetadata(config, projectID, key, nil) if err != nil { return err } @@ -135,7 +128,7 @@ func resourceComputeProjectMetadataItemDelete(d *schema.ResourceData, meta inter return nil } -func updateComputeCommonInstanceMetadata(config *Config, projectID string, key string, afterVal *string, timeout int) error { +func updateComputeCommonInstanceMetadata(config *Config, projectID string, key string, afterVal *string) error { updateMD := func() error { log.Printf("[DEBUG] Loading project metadata: %s", projectID) project, err := config.clientCompute.Projects.Get(projectID).Do() @@ -180,7 +173,7 @@ func updateComputeCommonInstanceMetadata(config *Config, projectID string, key s log.Printf("[DEBUG] SetCommonInstanceMetadata: %d (%s)", op.Id, op.SelfLink) - return computeOperationWaitTime(config.clientCompute, op, project.Name, "SetCommonInstanceMetadata", timeout) + return computeOperationWait(config.clientCompute, op, project.Name, "SetCommonInstanceMetadata") } return MetadataRetryWrapper(updateMD) diff --git a/google/resource_compute_project_metadata_test.go b/google/resource_compute_project_metadata_test.go index f61cf746..0ab37189 100644 --- a/google/resource_compute_project_metadata_test.go +++ b/google/resource_compute_project_metadata_test.go @@ -7,6 +7,7 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" + "google.golang.org/api/compute/v1" ) // Add two key value pairs @@ -15,6 +16,7 @@ func TestAccComputeProjectMetadata_basic(t *testing.T) { org := getTestOrgFromEnv(t) billingId := getTestBillingAccountFromEnv(t) + var project compute.Project projectID := "terrafom-test-" + acctest.RandString(10) resource.Test(t, resource.TestCase{ @@ -24,11 +26,13 @@ func TestAccComputeProjectMetadata_basic(t *testing.T) { Steps: []resource.TestStep{ resource.TestStep{ Config: testAccComputeProject_basic0_metadata(projectID, pname, org, billingId), - }, - resource.TestStep{ - ResourceName: "google_compute_project_metadata.fizzbuzz", - ImportState: true, - ImportStateVerify: true, + Check: resource.ComposeTestCheckFunc( + testAccCheckComputeProjectExists( + "google_compute_project_metadata.fizzbuzz", projectID, &project), + testAccCheckComputeProjectMetadataContains(projectID, "banana", "orange"), + testAccCheckComputeProjectMetadataContains(projectID, "sofa", "darwinism"), + testAccCheckComputeProjectMetadataSize(projectID, 2), + ), }, }, }) @@ -40,6 +44,7 @@ func TestAccComputeProjectMetadata_modify_1(t *testing.T) { org := getTestOrgFromEnv(t) billingId := getTestBillingAccountFromEnv(t) + var project compute.Project projectID := "terrafom-test-" + acctest.RandString(10) resource.Test(t, resource.TestCase{ @@ -49,20 +54,26 @@ func TestAccComputeProjectMetadata_modify_1(t *testing.T) { Steps: []resource.TestStep{ resource.TestStep{ Config: testAccComputeProject_modify0_metadata(projectID, pname, org, billingId), - }, - resource.TestStep{ - ResourceName: "google_compute_project_metadata.fizzbuzz", - ImportState: true, - ImportStateVerify: true, + Check: resource.ComposeTestCheckFunc( + testAccCheckComputeProjectExists( + "google_compute_project_metadata.fizzbuzz", projectID, &project), + testAccCheckComputeProjectMetadataContains(projectID, "paper", "pen"), + testAccCheckComputeProjectMetadataContains(projectID, "genghis_khan", "french bread"), + testAccCheckComputeProjectMetadataContains(projectID, "happy", "smiling"), + testAccCheckComputeProjectMetadataSize(projectID, 3), + ), }, resource.TestStep{ Config: testAccComputeProject_modify1_metadata(projectID, pname, org, billingId), - }, - resource.TestStep{ - ResourceName: "google_compute_project_metadata.fizzbuzz", - ImportState: true, - ImportStateVerify: true, + Check: resource.ComposeTestCheckFunc( + testAccCheckComputeProjectExists( + "google_compute_project_metadata.fizzbuzz", projectID, &project), + testAccCheckComputeProjectMetadataContains(projectID, "paper", "pen"), + testAccCheckComputeProjectMetadataContains(projectID, "paris", "french bread"), + testAccCheckComputeProjectMetadataContains(projectID, "happy", "laughing"), + testAccCheckComputeProjectMetadataSize(projectID, 3), + ), }, }, }) @@ -74,6 +85,7 @@ func TestAccComputeProjectMetadata_modify_2(t *testing.T) { org := getTestOrgFromEnv(t) billingId := getTestBillingAccountFromEnv(t) + var project compute.Project projectID := "terraform-test-" + acctest.RandString(10) resource.Test(t, resource.TestCase{ @@ -83,20 +95,24 @@ func TestAccComputeProjectMetadata_modify_2(t *testing.T) { Steps: []resource.TestStep{ resource.TestStep{ Config: testAccComputeProject_basic0_metadata(projectID, pname, org, billingId), - }, - resource.TestStep{ - ResourceName: "google_compute_project_metadata.fizzbuzz", - ImportState: true, - ImportStateVerify: true, + Check: resource.ComposeTestCheckFunc( + testAccCheckComputeProjectExists( + "google_compute_project_metadata.fizzbuzz", projectID, &project), + testAccCheckComputeProjectMetadataContains(projectID, "banana", "orange"), + testAccCheckComputeProjectMetadataContains(projectID, "sofa", "darwinism"), + testAccCheckComputeProjectMetadataSize(projectID, 2), + ), }, resource.TestStep{ Config: testAccComputeProject_basic1_metadata(projectID, pname, org, billingId), - }, - resource.TestStep{ - ResourceName: "google_compute_project_metadata.fizzbuzz", - ImportState: true, - ImportStateVerify: true, + Check: resource.ComposeTestCheckFunc( + testAccCheckComputeProjectExists( + "google_compute_project_metadata.fizzbuzz", projectID, &project), + testAccCheckComputeProjectMetadataContains(projectID, "kiwi", "papaya"), + testAccCheckComputeProjectMetadataContains(projectID, "finches", "darwinism"), + testAccCheckComputeProjectMetadataSize(projectID, 2), + ), }, }, }) @@ -119,6 +135,74 @@ func testAccCheckComputeProjectMetadataDestroy(s *terraform.State) error { return nil } +func testAccCheckComputeProjectExists(n, projectID string, project *compute.Project) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No ID is set") + } + + config := testAccProvider.Meta().(*Config) + + found, err := config.clientCompute.Projects.Get(projectID).Do() + if err != nil { + return err + } + + if "common_metadata" != rs.Primary.ID { + return fmt.Errorf("Common metadata not found, found %s", rs.Primary.ID) + } + + *project = *found + + return nil + } +} + +func testAccCheckComputeProjectMetadataContains(projectID, key, value string) resource.TestCheckFunc { + return func(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + project, err := config.clientCompute.Projects.Get(projectID).Do() + if err != nil { + return fmt.Errorf("Error, failed to load project service for %s: %s", config.Project, err) + } + + for _, kv := range project.CommonInstanceMetadata.Items { + if kv.Key == key { + if kv.Value != nil && *kv.Value == value { + return nil + } else { + return fmt.Errorf("Error, key value mismatch, wanted (%s, %s), got (%s, %s)", + key, value, kv.Key, *kv.Value) + } + } + } + + return fmt.Errorf("Error, key %s not present in %s", key, project.SelfLink) + } +} + +func testAccCheckComputeProjectMetadataSize(projectID string, size int) resource.TestCheckFunc { + return func(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + project, err := config.clientCompute.Projects.Get(projectID).Do() + if err != nil { + return fmt.Errorf("Error, failed to load project service for %s: %s", config.Project, err) + } + + if size > len(project.CommonInstanceMetadata.Items) { + return fmt.Errorf("Error, expected at least %d metadata items, got %d", size, + len(project.CommonInstanceMetadata.Items)) + } + + return nil + } +} + func testAccComputeProject_basic0_metadata(projectID, name, org, billing string) string { return fmt.Sprintf(` resource "google_project" "project" { diff --git a/google/resource_compute_region_autoscaler_generated_test.go b/google/resource_compute_region_autoscaler_generated_test.go index 8e9aee5c..369f9906 100644 --- a/google/resource_compute_region_autoscaler_generated_test.go +++ b/google/resource_compute_region_autoscaler_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeRegionAutoscaler_regionAutoscalerBasicExample(t *testing.T) { @@ -105,25 +104,3 @@ data "google_compute_image" "debian_9" { `, val, val, val, val, ) } - -func testAccCheckComputeRegionAutoscalerDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_region_autoscaler" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/regions/{{region}}/autoscalers/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeRegionAutoscaler still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_region_autoscaler_test.go b/google/resource_compute_region_autoscaler_test.go index 48e7950c..2336fddc 100644 --- a/google/resource_compute_region_autoscaler_test.go +++ b/google/resource_compute_region_autoscaler_test.go @@ -73,6 +73,25 @@ func TestAccComputeRegionAutoscaler_update(t *testing.T) { }) } +func testAccCheckComputeRegionAutoscalerDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_region_autoscaler" { + continue + } + + idParts := strings.Split(rs.Primary.ID, "/") + region, name := idParts[0], idParts[1] + _, err := config.clientCompute.RegionAutoscalers.Get(config.Project, region, name).Do() + if err == nil { + return fmt.Errorf("Autoscaler still exists") + } + } + + return nil +} + func testAccCheckComputeRegionAutoscalerExists(n string, ascaler *compute.Autoscaler) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_region_disk.go b/google/resource_compute_region_disk.go index 46417e23..d05f7bdd 100644 --- a/google/resource_compute_region_disk.go +++ b/google/resource_compute_region_disk.go @@ -18,6 +18,7 @@ import ( "fmt" "log" "reflect" + "regexp" "strconv" "time" @@ -848,6 +849,25 @@ func resourceComputeRegionDiskEncoder(d *schema.ResourceData, meta interface{}, log.Printf("[DEBUG] Image name resolved to: %s", imageUrl) } + if v, ok := d.GetOk("snapshot"); ok { + snapshotName := v.(string) + match, _ := regexp.MatchString("^https://www.googleapis.com/compute", snapshotName) + if match { + obj["sourceSnapshot"] = snapshotName + } else { + log.Printf("[DEBUG] Loading snapshot: %s", snapshotName) + snapshotData, err := config.clientCompute.Snapshots.Get( + project, snapshotName).Do() + + if err != nil { + return nil, fmt.Errorf( + "Error loading snapshot '%s': %s", + snapshotName, err) + } + obj["sourceSnapshot"] = snapshotData.SelfLink + } + } + return obj, nil } diff --git a/google/resource_compute_region_disk_generated_test.go b/google/resource_compute_region_disk_generated_test.go index 78c0e2c1..1a1c03d3 100644 --- a/google/resource_compute_region_disk_generated_test.go +++ b/google/resource_compute_region_disk_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeRegionDisk_regionDiskBasicExample(t *testing.T) { @@ -70,25 +69,3 @@ resource "google_compute_snapshot" "snapdisk" { `, val, val, val, ) } - -func testAccCheckComputeRegionDiskDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_region_disk" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/regions/{{region}}/disks/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeRegionDisk still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_region_disk_test.go b/google/resource_compute_region_disk_test.go index b7e4d4ff..c6598355 100644 --- a/google/resource_compute_region_disk_test.go +++ b/google/resource_compute_region_disk_test.go @@ -175,6 +175,24 @@ func TestAccComputeRegionDisk_deleteDetach(t *testing.T) { }) } +func testAccCheckComputeRegionDiskDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_region_disk" { + continue + } + + _, err := config.clientComputeBeta.RegionDisks.Get( + config.Project, rs.Primary.Attributes["region"], rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("RegionDisk still exists") + } + } + + return nil +} + func testAccCheckComputeRegionDiskExists(n string, disk *computeBeta.Disk) resource.TestCheckFunc { return func(s *terraform.State) error { p := getTestProjectFromEnv() diff --git a/google/resource_compute_region_instance_group_manager.go b/google/resource_compute_region_instance_group_manager.go index 191e44ab..648083b3 100644 --- a/google/resource_compute_region_instance_group_manager.go +++ b/google/resource_compute_region_instance_group_manager.go @@ -145,7 +145,6 @@ func resourceComputeRegionInstanceGroupManager() *schema.Resource { Type: schema.TypeString, Optional: true, Default: "NONE", - Deprecated: "This field will have no functionality in 2.0.0, and will be removed. If you're using ROLLING_UPDATE, use the google-beta provider. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", ValidateFunc: validation.StringInSlice([]string{"NONE", "ROLLING_UPDATE"}, false), }, @@ -207,10 +206,10 @@ func resourceComputeRegionInstanceGroupManager() *schema.Resource { }, "rolling_update_policy": &schema.Schema{ - Deprecated: "This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", Type: schema.TypeList, Optional: true, MaxItems: 1, + Deprecated: "This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "minimal_action": &schema.Schema{ @@ -349,14 +348,9 @@ func waitForInstancesRefreshFunc(f getInstanceManagerFunc, d *schema.ResourceDat func resourceComputeRegionInstanceGroupManagerRead(d *schema.ResourceData, meta interface{}) error { config := meta.(*Config) manager, err := getRegionalManager(d, meta) - if err != nil { + if err != nil || manager == nil { return err } - if manager == nil { - log.Printf("[WARN] Region Instance Group Manager %q not found, removing from state.", d.Id()) - d.SetId("") - return nil - } project, err := getProject(d, config) if err != nil { @@ -364,7 +358,7 @@ func resourceComputeRegionInstanceGroupManagerRead(d *schema.ResourceData, meta } d.Set("base_instance_name", manager.BaseInstanceName) - d.Set("instance_template", ConvertSelfLinkToV1(manager.InstanceTemplate)) + d.Set("instance_template", manager.InstanceTemplate) if err := d.Set("version", flattenVersions(manager.Versions)); err != nil { return err } @@ -373,17 +367,11 @@ func resourceComputeRegionInstanceGroupManagerRead(d *schema.ResourceData, meta d.Set("description", manager.Description) d.Set("project", project) d.Set("target_size", manager.TargetSize) - if err := d.Set("target_pools", manager.TargetPools); err != nil { - return fmt.Errorf("Error setting target_pools in state: %s", err.Error()) - } - if err := d.Set("named_port", flattenNamedPortsBeta(manager.NamedPorts)); err != nil { - return fmt.Errorf("Error setting named_port in state: %s", err.Error()) - } + d.Set("target_pools", manager.TargetPools) + d.Set("named_port", flattenNamedPortsBeta(manager.NamedPorts)) d.Set("fingerprint", manager.Fingerprint) d.Set("instance_group", ConvertSelfLinkToV1(manager.InstanceGroup)) - if err := d.Set("auto_healing_policies", flattenAutoHealingPolicies(manager.AutoHealingPolicies)); err != nil { - return fmt.Errorf("Error setting auto_healing_policies in state: %s", err.Error()) - } + d.Set("auto_healing_policies", flattenAutoHealingPolicies(manager.AutoHealingPolicies)) if err := d.Set("distribution_policy_zones", flattenDistributionPolicy(manager.DistributionPolicy)); err != nil { return err } diff --git a/google/resource_compute_region_instance_group_manager_test.go b/google/resource_compute_region_instance_group_manager_test.go index 1ffe0b74..1d51a917 100644 --- a/google/resource_compute_region_instance_group_manager_test.go +++ b/google/resource_compute_region_instance_group_manager_test.go @@ -193,7 +193,7 @@ func TestAccRegionInstanceGroupManager_rollingUpdatePolicy(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckInstanceGroupManagerDestroy, Steps: []resource.TestStep{ - { + resource.TestStep{ Config: testAccRegionInstanceGroupManager_rollingUpdatePolicy(igm), Check: resource.ComposeTestCheckFunc( testAccCheckRegionInstanceGroupManagerBetaExists( @@ -212,7 +212,7 @@ func TestAccRegionInstanceGroupManager_rollingUpdatePolicy(t *testing.T) { "google_compute_region_instance_group_manager.igm-rolling-update-policy", "rolling_update_policy.0.min_ready_sec", "20"), ), }, - { + resource.TestStep{ Config: testAccRegionInstanceGroupManager_rollingUpdatePolicy2(igm), Check: resource.ComposeTestCheckFunc( testAccCheckRegionInstanceGroupManagerBetaExists( @@ -1056,7 +1056,6 @@ resource "google_compute_http_health_check" "zero" { } `, template, target, igm, hck) } - func testAccRegionInstanceGroupManager_versions(primaryTemplate string, canaryTemplate string, igm string) string { return fmt.Sprintf(` data "google_compute_image" "my_image" { diff --git a/google/resource_compute_route_generated_test.go b/google/resource_compute_route_generated_test.go index 6f9b7f48..bfe5dc59 100644 --- a/google/resource_compute_route_generated_test.go +++ b/google/resource_compute_route_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeRoute_routeBasicExample(t *testing.T) { @@ -59,25 +58,3 @@ resource "google_compute_network" "default" { `, val, val, ) } - -func testAccCheckComputeRouteDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_route" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/routes/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeRoute still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_route_test.go b/google/resource_compute_route_test.go index 0b91a951..8cd1ce21 100644 --- a/google/resource_compute_route_test.go +++ b/google/resource_compute_route_test.go @@ -95,6 +95,24 @@ func TestAccComputeRoute_hopInstance(t *testing.T) { }) } +func testAccCheckComputeRouteDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_route" { + continue + } + + _, err := config.clientCompute.Routes.Get( + config.Project, rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("Route still exists") + } + } + + return nil +} + func testAccCheckComputeRouteExists(n string, route *compute.Route) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_router_generated_test.go b/google/resource_compute_router_generated_test.go index cbfb49af..8d6e4d6a 100644 --- a/google/resource_compute_router_generated_test.go +++ b/google/resource_compute_router_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeRouter_routerBasicExample(t *testing.T) { @@ -68,25 +67,3 @@ resource "google_compute_network" "foobar" { `, val, val, ) } - -func testAccCheckComputeRouterDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_router" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/regions/{{region}}/routers/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeRouter still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_router_nat.go b/google/resource_compute_router_nat.go deleted file mode 100644 index bc45b8de..00000000 --- a/google/resource_compute_router_nat.go +++ /dev/null @@ -1,387 +0,0 @@ -package google - -import ( - "fmt" - "log" - "time" - - "strings" - - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" - computeBeta "google.golang.org/api/compute/v0.beta" - - "google.golang.org/api/googleapi" -) - -var ( - routerNatSubnetworkConfig = &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "source_ip_ranges_to_nat": &schema.Schema{ - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "secondary_ip_range_names": &schema.Schema{ - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - }, - } -) - -func resourceComputeRouterNat() *schema.Resource { - return &schema.Resource{ - // TODO(https://github.com/GoogleCloudPlatform/magic-modules/issues/963): Implement Update - Create: resourceComputeRouterNatCreate, - Read: resourceComputeRouterNatRead, - Delete: resourceComputeRouterNatDelete, - Importer: &schema.ResourceImporter{ - State: resourceComputeRouterNatImportState, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(10 * time.Minute), - Delete: schema.DefaultTimeout(10 * time.Minute), - }, - - Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateRFC1035Name(2, 63), - }, - "router": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "nat_ip_allocate_option": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{"MANUAL_ONLY", "AUTO_ONLY"}, false), - }, - "nat_ips": &schema.Schema{ - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "source_subnetwork_ip_ranges_to_nat": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{"ALL_SUBNETWORKS_ALL_IP_RANGES", "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES", "LIST_OF_SUBNETWORKS"}, false), - }, - "subnetwork": &schema.Schema{ - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: routerNatSubnetworkConfig, - }, - "min_ports_per_vm": &schema.Schema{ - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - "udp_idle_timeout_sec": &schema.Schema{ - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - "icmp_idle_timeout_sec": &schema.Schema{ - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - "tcp_established_idle_timeout_sec": &schema.Schema{ - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - "tcp_transitory_idle_timeout_sec": &schema.Schema{ - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - }, - "project": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "region": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - }, - } -} - -func resourceComputeRouterNatCreate(d *schema.ResourceData, meta interface{}) error { - - config := meta.(*Config) - - region, err := getRegion(d, config) - if err != nil { - return err - } - - project, err := getProject(d, config) - if err != nil { - return err - } - - routerName := d.Get("router").(string) - natName := d.Get("name").(string) - - routerLock := getRouterLockName(region, routerName) - mutexKV.Lock(routerLock) - defer mutexKV.Unlock(routerLock) - - routersService := config.clientComputeBeta.Routers - router, err := routersService.Get(project, region, routerName).Do() - if err != nil { - if gerr, ok := err.(*googleapi.Error); ok && gerr.Code == 404 { - return fmt.Errorf("Router %s/%s not found", region, routerName) - } - - return fmt.Errorf("Error Reading router %s/%s: %s", region, routerName, err) - } - - nats := router.Nats - for _, nat := range nats { - if nat.Name == natName { - return fmt.Errorf("Router %s has nat %s already", routerName, natName) - } - } - - nat := &computeBeta.RouterNat{ - Name: natName, - NatIpAllocateOption: d.Get("nat_ip_allocate_option").(string), - NatIps: convertStringArr(d.Get("nat_ips").(*schema.Set).List()), - SourceSubnetworkIpRangesToNat: d.Get("source_subnetwork_ip_ranges_to_nat").(string), - MinPortsPerVm: int64(d.Get("min_ports_per_vm").(int)), - UdpIdleTimeoutSec: int64(d.Get("udp_idle_timeout_sec").(int)), - IcmpIdleTimeoutSec: int64(d.Get("icmp_idle_timeout_sec").(int)), - TcpEstablishedIdleTimeoutSec: int64(d.Get("tcp_established_idle_timeout_sec").(int)), - TcpTransitoryIdleTimeoutSec: int64(d.Get("tcp_transitory_idle_timeout_sec").(int)), - } - - if v, ok := d.GetOk("subnetwork"); ok { - nat.Subnetworks = expandSubnetworks(v.(*schema.Set).List()) - } - - log.Printf("[INFO] Adding nat %s", natName) - nats = append(nats, nat) - patchRouter := &computeBeta.Router{ - Nats: nats, - } - - log.Printf("[DEBUG] Updating router %s/%s with nats: %+v", region, routerName, nats) - op, err := routersService.Patch(project, region, router.Name, patchRouter).Do() - if err != nil { - return fmt.Errorf("Error patching router %s/%s: %s", region, routerName, err) - } - d.SetId(fmt.Sprintf("%s/%s/%s", region, routerName, natName)) - err = computeBetaOperationWaitTime(config.clientCompute, op, project, "Patching router", int(d.Timeout(schema.TimeoutCreate).Minutes())) - if err != nil { - d.SetId("") - return fmt.Errorf("Error waiting to patch router %s/%s: %s", region, routerName, err) - } - - return resourceComputeRouterNatRead(d, meta) -} - -func resourceComputeRouterNatRead(d *schema.ResourceData, meta interface{}) error { - - config := meta.(*Config) - - region, err := getRegion(d, config) - if err != nil { - return err - } - - project, err := getProject(d, config) - if err != nil { - return err - } - - routerName := d.Get("router").(string) - natName := d.Get("name").(string) - - routersService := config.clientComputeBeta.Routers - router, err := routersService.Get(project, region, routerName).Do() - if err != nil { - if gerr, ok := err.(*googleapi.Error); ok && gerr.Code == 404 { - log.Printf("[WARN] Removing router nat %s because its router %s/%s is gone", natName, region, routerName) - d.SetId("") - - return nil - } - - return fmt.Errorf("Error Reading router %s/%s: %s", region, routerName, err) - } - - for _, nat := range router.Nats { - - if nat.Name == natName { - d.SetId(fmt.Sprintf("%s/%s/%s", region, routerName, natName)) - d.Set("nat_ip_allocate_option", nat.NatIpAllocateOption) - d.Set("nat_ips", schema.NewSet(schema.HashString, convertStringArrToInterface(convertSelfLinksToV1(nat.NatIps)))) - d.Set("source_subnetwork_ip_ranges_to_nat", nat.SourceSubnetworkIpRangesToNat) - d.Set("min_ports_per_vm", nat.MinPortsPerVm) - d.Set("udp_idle_timeout_sec", nat.UdpIdleTimeoutSec) - d.Set("icmp_idle_timeout_sec", nat.IcmpIdleTimeoutSec) - d.Set("tcp_established_idle_timeout_sec", nat.TcpEstablishedIdleTimeoutSec) - d.Set("tcp_transitory_idle_timeout_sec", nat.TcpTransitoryIdleTimeoutSec) - d.Set("region", region) - d.Set("project", project) - - if err := d.Set("subnetwork", flattenRouterNatSubnetworkToNatBeta(nat.Subnetworks)); err != nil { - return fmt.Errorf("Error reading router nat: %s", err) - } - - return nil - } - } - - log.Printf("[WARN] Removing router nat %s/%s/%s because it is gone", region, routerName, natName) - d.SetId("") - return nil -} - -func resourceComputeRouterNatDelete(d *schema.ResourceData, meta interface{}) error { - - config := meta.(*Config) - - region, err := getRegion(d, config) - if err != nil { - return err - } - - project, err := getProject(d, config) - if err != nil { - return err - } - - routerName := d.Get("router").(string) - natName := d.Get("name").(string) - - routerLock := getRouterLockName(region, routerName) - mutexKV.Lock(routerLock) - defer mutexKV.Unlock(routerLock) - - routersService := config.clientComputeBeta.Routers - router, err := routersService.Get(project, region, routerName).Do() - if err != nil { - if gerr, ok := err.(*googleapi.Error); ok && gerr.Code == 404 { - log.Printf("[WARN] Removing router nat %s because its router %s/%s is gone", natName, region, routerName) - - return nil - } - - return fmt.Errorf("Error Reading Router %s: %s", routerName, err) - } - - var newNats []*computeBeta.RouterNat = make([]*computeBeta.RouterNat, 0, len(router.Nats)) - for _, nat := range router.Nats { - if nat.Name == natName { - continue - } else { - newNats = append(newNats, nat) - } - } - - if len(newNats) == len(router.Nats) { - log.Printf("[DEBUG] Router %s/%s had no nat %s already", region, routerName, natName) - d.SetId("") - return nil - } - - log.Printf("[INFO] Removing nat %s from router %s/%s", natName, region, routerName) - patchRouter := &computeBeta.Router{ - Nats: newNats, - } - - if len(newNats) == 0 { - patchRouter.ForceSendFields = append(patchRouter.ForceSendFields, "Nats") - } - - log.Printf("[DEBUG] Updating router %s/%s with nats: %+v", region, routerName, newNats) - op, err := routersService.Patch(project, region, router.Name, patchRouter).Do() - if err != nil { - return fmt.Errorf("Error patching router %s/%s: %s", region, routerName, err) - } - - err = computeBetaOperationWaitTime(config.clientCompute, op, project, "Patching router", int(d.Timeout(schema.TimeoutDelete).Minutes())) - if err != nil { - return fmt.Errorf("Error waiting to patch router %s/%s: %s", region, routerName, err) - } - - d.SetId("") - return nil -} - -func resourceComputeRouterNatImportState(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - parts := strings.Split(d.Id(), "/") - if len(parts) != 3 { - return nil, fmt.Errorf("Invalid router nat specifier. Expecting {region}/{router}/{nat}") - } - - d.Set("region", parts[0]) - d.Set("router", parts[1]) - d.Set("name", parts[2]) - - return []*schema.ResourceData{d}, nil -} - -func expandSubnetworks(subnetworks []interface{}) []*computeBeta.RouterNatSubnetworkToNat { - result := make([]*computeBeta.RouterNatSubnetworkToNat, 0, len(subnetworks)) - - for _, subnetwork := range subnetworks { - snm := subnetwork.(map[string]interface{}) - subnetworkToNat := computeBeta.RouterNatSubnetworkToNat{ - Name: snm["name"].(string), - SourceIpRangesToNat: convertStringSet(snm["source_ip_ranges_to_nat"].(*schema.Set)), - } - if v, ok := snm["secondary_ip_range_names"]; ok { - subnetworkToNat.SecondaryIpRangeNames = convertStringSet(v.(*schema.Set)) - } - result = append(result, &subnetworkToNat) - } - - return result -} - -func flattenRouterNatSubnetworkToNatBeta(subnetworksToNat []*computeBeta.RouterNatSubnetworkToNat) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(subnetworksToNat)) - for _, subnetworkToNat := range subnetworksToNat { - stnMap := make(map[string]interface{}) - stnMap["name"] = ConvertSelfLinkToV1(subnetworkToNat.Name) - stnMap["source_ip_ranges_to_nat"] = schema.NewSet(schema.HashString, convertStringArrToInterface(subnetworkToNat.SourceIpRangesToNat)) - stnMap["secondary_ip_range_names"] = schema.NewSet(schema.HashString, convertStringArrToInterface(subnetworkToNat.SecondaryIpRangeNames)) - result = append(result, stnMap) - } - return result -} - -func convertSelfLinksToV1(selfLinks []string) []string { - result := make([]string, 0, len(selfLinks)) - for _, selfLink := range selfLinks { - result = append(result, ConvertSelfLinkToV1(selfLink)) - } - return result -} diff --git a/google/resource_compute_router_nat_test.go b/google/resource_compute_router_nat_test.go deleted file mode 100644 index 3a728cb9..00000000 --- a/google/resource_compute_router_nat_test.go +++ /dev/null @@ -1,224 +0,0 @@ -package google - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" -) - -func TestAccComputeRouterNat_basic(t *testing.T) { - t.Parallel() - - testId := acctest.RandString(10) - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeRouterNatDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeRouterNatBasic(testId), - }, - resource.TestStep{ - ResourceName: "google_compute_router_nat.foobar", - ImportState: true, - ImportStateVerify: true, - }, - resource.TestStep{ - Config: testAccComputeRouterNatKeepRouter(testId), - Check: testAccCheckComputeRouterNatDelete( - "google_compute_router_nat.foobar"), - }, - }, - }) -} - -func TestAccComputeRouterNat_withManualIpAndSubnetConfiguration(t *testing.T) { - t.Parallel() - - testId := acctest.RandString(10) - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeRouterNatDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeRouterNatWithManualIpAndSubnetConfiguration(testId), - }, - resource.TestStep{ - ResourceName: "google_compute_router_nat.foobar", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccCheckComputeRouterNatDestroy(s *terraform.State) error { - config := testAccProvider.Meta().(*Config) - - routersService := config.clientCompute.Routers - - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_router" { - continue - } - - project, err := getTestProject(rs.Primary, config) - if err != nil { - return err - } - - region, err := getTestRegion(rs.Primary, config) - if err != nil { - return err - } - - routerName := rs.Primary.Attributes["router"] - - _, err = routersService.Get(project, region, routerName).Do() - - if err == nil { - return fmt.Errorf("Error, Router %s in region %s still exists", - routerName, region) - } - } - - return nil -} - -func testAccCheckComputeRouterNatDelete(n string) resource.TestCheckFunc { - return func(s *terraform.State) error { - config := testAccProvider.Meta().(*Config) - - routersService := config.clientComputeBeta.Routers - - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_router_nat" { - continue - } - - project, err := getTestProject(rs.Primary, config) - if err != nil { - return err - } - - region, err := getTestRegion(rs.Primary, config) - if err != nil { - return err - } - - name := rs.Primary.Attributes["name"] - routerName := rs.Primary.Attributes["router"] - - router, err := routersService.Get(project, region, routerName).Do() - - if err != nil { - return fmt.Errorf("Error Reading Router %s: %s", routerName, err) - } - - nats := router.Nats - for _, nat := range nats { - - if nat.Name == name { - return fmt.Errorf("Nat %s still exists on router %s/%s", name, region, router.Name) - } - } - } - - return nil - } -} - -func testAccComputeRouterNatBasic(testId string) string { - return fmt.Sprintf(` - resource "google_compute_network" "foobar" { - name = "router-nat-test-%s" - } - resource "google_compute_subnetwork" "foobar" { - name = "router-nat-test-subnetwork-%s" - network = "${google_compute_network.foobar.self_link}" - ip_cidr_range = "10.0.0.0/16" - region = "us-central1" - } - resource "google_compute_router" "foobar"{ - name = "router-nat-test-%s" - region = "${google_compute_subnetwork.foobar.region}" - network = "${google_compute_network.foobar.self_link}" - bgp { - asn = 64514 - } - } - resource "google_compute_router_nat" "foobar" { - name = "router-nat-test-%s" - router = "${google_compute_router.foobar.name}" - region = "${google_compute_router.foobar.region}" - nat_ip_allocate_option = "AUTO_ONLY" - source_subnetwork_ip_ranges_to_nat = "ALL_SUBNETWORKS_ALL_IP_RANGES" - } - `, testId, testId, testId, testId) -} - -func testAccComputeRouterNatWithManualIpAndSubnetConfiguration(testId string) string { - return fmt.Sprintf(` - resource "google_compute_network" "foobar" { - name = "router-nat-test-%s" - auto_create_subnetworks = "false" - } - resource "google_compute_subnetwork" "foobar" { - name = "router-nat-test-subnetwork-%s" - network = "${google_compute_network.foobar.self_link}" - ip_cidr_range = "10.0.0.0/16" - region = "us-central1" - } - resource "google_compute_address" "foobar" { - name = "router-nat-test-%s" - region = "${google_compute_subnetwork.foobar.region}" - } - resource "google_compute_router" "foobar"{ - name = "router-nat-test-%s" - region = "${google_compute_subnetwork.foobar.region}" - network = "${google_compute_network.foobar.self_link}" - bgp { - asn = 64514 - } - } - resource "google_compute_router_nat" "foobar" { - name = "router-nat-test-%s" - router = "${google_compute_router.foobar.name}" - region = "${google_compute_router.foobar.region}" - nat_ip_allocate_option = "MANUAL_ONLY" - nat_ips = ["${google_compute_address.foobar.self_link}"] - source_subnetwork_ip_ranges_to_nat = "LIST_OF_SUBNETWORKS" - subnetwork { - name = "${google_compute_subnetwork.foobar.self_link}" - source_ip_ranges_to_nat = ["ALL_IP_RANGES"] - } - } - `, testId, testId, testId, testId, testId) -} - -func testAccComputeRouterNatKeepRouter(testId string) string { - return fmt.Sprintf(` - resource "google_compute_network" "foobar" { - name = "router-nat-test-%s" - auto_create_subnetworks = "false" - } - resource "google_compute_subnetwork" "foobar" { - name = "router-nat-test-subnetwork-%s" - network = "${google_compute_network.foobar.self_link}" - ip_cidr_range = "10.0.0.0/16" - region = "us-central1" - } - resource "google_compute_router" "foobar"{ - name = "router-nat-test-%s" - region = "${google_compute_subnetwork.foobar.region}" - network = "${google_compute_network.foobar.self_link}" - bgp { - asn = 64514 - } - } - `, testId, testId, testId) -} diff --git a/google/resource_compute_router_test.go b/google/resource_compute_router_test.go index adaeb3e0..336f5447 100644 --- a/google/resource_compute_router_test.go +++ b/google/resource_compute_router_test.go @@ -6,6 +6,7 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" ) func TestAccComputeRouter_basic(t *testing.T) { @@ -111,6 +112,39 @@ func TestAccComputeRouter_update(t *testing.T) { }) } +func testAccCheckComputeRouterDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + routersService := config.clientCompute.Routers + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_router" { + continue + } + + project, err := getTestProject(rs.Primary, config) + if err != nil { + return err + } + + region, err := getTestRegion(rs.Primary, config) + if err != nil { + return err + } + + name := rs.Primary.Attributes["name"] + + _, err = routersService.Get(project, region, name).Do() + + if err == nil { + return fmt.Errorf("Error, Router %s in region %s still exists", + name, region) + } + } + + return nil +} + func testAccComputeRouterBasic(testId, resourceRegion string) string { return fmt.Sprintf(` resource "google_compute_network" "foobar" { diff --git a/google/resource_compute_snapshot.go b/google/resource_compute_snapshot.go index 1e416748..cd38ba82 100644 --- a/google/resource_compute_snapshot.go +++ b/google/resource_compute_snapshot.go @@ -1,531 +1,220 @@ -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - package google import ( "fmt" "log" - "reflect" - "strconv" "time" - "github.com/hashicorp/terraform/helper/customdiff" "github.com/hashicorp/terraform/helper/schema" - compute "google.golang.org/api/compute/v1" + "google.golang.org/api/compute/v1" + "google.golang.org/api/googleapi" ) -func customDiffComputeSnapshotSnapshotEncryptionKeys(diff *schema.ResourceDiff, meta interface{}) error { - oldConvenience, newConvenience := diff.GetChange("snapshot_encryption_key_raw") - oldNewField, newNewField := diff.GetChange("snapshot_encryption_key.0.raw_key") - - if newConvenience != "" && newNewField != "" { - return fmt.Errorf("can't use snapshot_encryption_key_raw and snapshot_encryption_key.0.raw_key at the same time." + - "If you're removing snapshot_encryption_key.0.raw_key, set the value to \"\" instead. This is due to limitations in Terraform.") - } - - // Either field (convenience or new) has a value - // and then has another different value, so we ForceNew. - // We need to handle _EVERY_ ForceNew case in this diff - if oldConvenience != "" && newConvenience != "" && oldConvenience != newConvenience { - return diff.ForceNew("snapshot_encryption_key_raw") - } - - if oldNewField != "" && newNewField != "" && oldNewField != newNewField { - return diff.ForceNew("snapshot_encryption_key.0.raw_key") - } - - // Our resource isn't using either field, then uses one; - // ForceNew on whichever one is now using it. - if (oldConvenience == "" && oldNewField == "" && newConvenience != "") || (oldConvenience == "" && oldNewField == "" && newNewField != "") { - if oldConvenience == "" && newConvenience != "" { - return diff.ForceNew("snapshot_encryption_key_raw") - } else { - return diff.ForceNew("snapshot_encryption_key.0.raw_key") - } - } - - // convenience no longer used - if oldConvenience != "" && newConvenience == "" { - if newNewField == "" { - // convenience is being nulled, and the new field is empty as well - // we've stopped using the field altogether - return diff.ForceNew("snapshot_encryption_key_raw") - } else if oldConvenience != newNewField { - // convenience is being nulled, and the new field has a new value - // so we ForceNew on either field - return diff.ForceNew("snapshot_encryption_key_raw") - } else { - // If we reach it here, we're using the same value in the new field as we had in the convenience field - } - } - - // new no longer used - // note that it will remain _set_ because of how Computed fields work - // unset fields will have their values kept in state as a non-zero value - if oldNewField != "" && newNewField == "" { - if newConvenience == "" { - // new field is being nulled, and the convenience field is empty as well - // we've stopped using the field altogether - return diff.ForceNew("snapshot_encryption_key.0.raw_key") - } else if oldNewField != newConvenience { - // new is being nulled, and the convenience field has a new value - // so we ForceNew on either field - - // This stops a really opaque diffs don't match during apply error. Without this, wee see - // a diff from the old state -> new state with a ForceNew at plan time (as expected!) - // But during apply time the entire nested object is nil in old state unexpectedly. - // So we just force the diff to match more by nilling it here, which is unclear why it - // works, and probably a worse UX with some real ugly diff, but also makes the tests pass. - // Computed nested fields are hard. - err := diff.SetNew("snapshot_encryption_key", nil) - if err != nil { - return err - } - - return diff.ForceNew("snapshot_encryption_key.0.raw_key") - } else { - // If we reach it here, we're using the same value in the convenience field as we had in the new field - } - } - - return nil -} - -func customDiffComputeSnapshotSourceDiskEncryptionKeys(diff *schema.ResourceDiff, meta interface{}) error { - oldConvenience, newConvenience := diff.GetChange("source_disk_encryption_key_raw") - oldNewField, newNewField := diff.GetChange("source_disk_encryption_key.0.raw_key") - - // Either field has a value and then has another value - // We need to handle _EVERY_ ForceNew case in this diff - if oldConvenience != "" && newConvenience != "" && oldConvenience != newConvenience { - return diff.ForceNew("source_disk_encryption_key_raw") - } - - if oldNewField != "" && newNewField != "" && oldNewField != newNewField { - return diff.ForceNew("source_disk_encryption_key.0.raw_key") - } - - // Our resource isn't using either field, then uses one; - // ForceNew on whichever one is now using it. - if (oldConvenience == "" && oldNewField == "" && newConvenience != "") || (oldConvenience == "" && oldNewField == "" && newNewField != "") { - if oldConvenience == "" && newConvenience != "" { - return diff.ForceNew("source_disk_encryption_key_raw") - } else { - return diff.ForceNew("source_disk_encryption_key.0.raw_key") - } - } - - // convenience no longer used - if oldConvenience != "" && newConvenience == "" { - if newNewField == "" { - // convenience is being nulled, and the new field is empty as well - // we've stopped using the field altogether - return diff.ForceNew("source_disk_encryption_key_raw") - } else if oldConvenience != newNewField { - // convenience is being nulled, and the new field has a new value - // so we ForceNew on either field - return diff.ForceNew("source_disk_encryption_key_raw") - } else { - // If we reach it here, we're using the same value in the new field as we had in the convenience field - } - } - - // new no longer used - if oldNewField != "" && newNewField == "" { - if newConvenience == "" { - // new field is being nulled, and the convenience field is empty as well - // we've stopped using the field altogether - return diff.ForceNew("source_disk_encryption_key.0.raw_key") - } else if newConvenience != oldNewField { - // new is being nulled, and the convenience field has a new value - // so we ForceNew on either field - return diff.ForceNew("source_disk_encryption_key.0.raw_key") - } else { - // If we reach it here, we're using the same value in the convenience field as we had in the new field - } - } - - return nil -} - func resourceComputeSnapshot() *schema.Resource { return &schema.Resource{ Create: resourceComputeSnapshotCreate, Read: resourceComputeSnapshotRead, - Update: resourceComputeSnapshotUpdate, Delete: resourceComputeSnapshotDelete, - - Importer: &schema.ResourceImporter{ - State: resourceComputeSnapshotImport, - }, - - Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(300 * time.Second), - Update: schema.DefaultTimeout(300 * time.Second), - Delete: schema.DefaultTimeout(300 * time.Second), - }, - CustomizeDiff: customdiff.All( - customDiffComputeSnapshotSnapshotEncryptionKeys, - customDiffComputeSnapshotSourceDiskEncryptionKeys, - ), + Update: resourceComputeSnapshotUpdate, Schema: map[string]*schema.Schema{ - "name": { + "name": &schema.Schema{ Type: schema.TypeString, Required: true, ForceNew: true, }, - "source_disk": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - DiffSuppressFunc: compareSelfLinkOrResourceName, - }, - "description": { + + "zone": &schema.Schema{ Type: schema.TypeString, Optional: true, + Computed: true, ForceNew: true, }, - "labels": { + + "snapshot_encryption_key_raw": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Sensitive: true, + }, + + "snapshot_encryption_key_sha256": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + + "source_disk_encryption_key_raw": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Sensitive: true, + }, + + "source_disk_encryption_key_sha256": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + + "source_disk": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "source_disk_link": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + + "project": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + + "self_link": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + + "labels": &schema.Schema{ Type: schema.TypeMap, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, - }, - "snapshot_encryption_key": { - Type: schema.TypeList, - Computed: true, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "raw_key": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "sha256": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "source_disk_encryption_key": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "raw_key": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - }, - }, - }, - "zone": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - DiffSuppressFunc: compareSelfLinkOrResourceName, - }, - "creation_timestamp": { - Type: schema.TypeString, - Computed: true, - }, - "disk_size_gb": { - Type: schema.TypeInt, - Computed: true, - }, - "label_fingerprint": { - Type: schema.TypeString, - Computed: true, - }, - "licenses": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - DiffSuppressFunc: compareSelfLinkOrResourceName, - }, - }, - "snapshot_id": { - Type: schema.TypeInt, - Computed: true, - }, - "storage_bytes": { - Type: schema.TypeInt, - Computed: true, - }, - "source_disk_link": { - Type: schema.TypeString, - Computed: true, + Set: schema.HashString, }, - "snapshot_encryption_key_raw": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - Deprecated: "Use snapshot_encryption_key.raw_key instead.", - }, - - "snapshot_encryption_key_sha256": { - Type: schema.TypeString, - Computed: true, - Deprecated: "Use snapshot_encryption_key.sha256 instead.", - }, - - "source_disk_encryption_key_raw": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - Deprecated: "Use source_disk_encryption_key.raw_key instead.", - }, - - "source_disk_encryption_key_sha256": { - Type: schema.TypeString, - Computed: true, - Deprecated: "Use source_disk_encryption_key.sha256 instead.", - }, - "project": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "self_link": { + "label_fingerprint": &schema.Schema{ Type: schema.TypeString, Computed: true, }, }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(4 * time.Minute), + Update: schema.DefaultTimeout(4 * time.Minute), + Delete: schema.DefaultTimeout(4 * time.Minute), + }, } } func resourceComputeSnapshotCreate(d *schema.ResourceData, meta interface{}) error { config := meta.(*Config) - obj := make(map[string]interface{}) - nameProp, err := expandComputeSnapshotName(d.Get("name"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("name"); !isEmptyValue(reflect.ValueOf(nameProp)) && (ok || !reflect.DeepEqual(v, nameProp)) { - obj["name"] = nameProp - } - descriptionProp, err := expandComputeSnapshotDescription(d.Get("description"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("description"); !isEmptyValue(reflect.ValueOf(descriptionProp)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { - obj["description"] = descriptionProp - } - labelsProp, err := expandComputeSnapshotLabels(d.Get("labels"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("labels"); !isEmptyValue(reflect.ValueOf(labelsProp)) && (ok || !reflect.DeepEqual(v, labelsProp)) { - obj["labels"] = labelsProp - } - labelFingerprintProp, err := expandComputeSnapshotLabelFingerprint(d.Get("label_fingerprint"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("label_fingerprint"); !isEmptyValue(reflect.ValueOf(labelFingerprintProp)) && (ok || !reflect.DeepEqual(v, labelFingerprintProp)) { - obj["labelFingerprint"] = labelFingerprintProp - } - sourceDiskProp, err := expandComputeSnapshotSourceDisk(d.Get("source_disk"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("source_disk"); !isEmptyValue(reflect.ValueOf(sourceDiskProp)) && (ok || !reflect.DeepEqual(v, sourceDiskProp)) { - obj["sourceDisk"] = sourceDiskProp - } - zoneProp, err := expandComputeSnapshotZone(d.Get("zone"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("zone"); !isEmptyValue(reflect.ValueOf(zoneProp)) && (ok || !reflect.DeepEqual(v, zoneProp)) { - obj["zone"] = zoneProp - } - snapshotEncryptionKeyProp, err := expandComputeSnapshotSnapshotEncryptionKey(d.Get("snapshot_encryption_key"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("snapshot_encryption_key"); !isEmptyValue(reflect.ValueOf(snapshotEncryptionKeyProp)) && (ok || !reflect.DeepEqual(v, snapshotEncryptionKeyProp)) { - obj["snapshotEncryptionKey"] = snapshotEncryptionKeyProp - } - sourceDiskEncryptionKeyProp, err := expandComputeSnapshotSourceDiskEncryptionKey(d.Get("source_disk_encryption_key"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("source_disk_encryption_key"); !isEmptyValue(reflect.ValueOf(sourceDiskEncryptionKeyProp)) && (ok || !reflect.DeepEqual(v, sourceDiskEncryptionKeyProp)) { - obj["sourceDiskEncryptionKey"] = sourceDiskEncryptionKeyProp - } - - url, err := replaceVars(d, config, "https://www.googleapis.com/compute/v1/projects/{{project}}/zones/{{zone}}/disks/{{source_disk}}/createSnapshot") - if err != nil { - return err - } - - log.Printf("[DEBUG] Creating new Snapshot: %#v", obj) - res, err := sendRequest(config, "POST", url, obj) - if err != nil { - return fmt.Errorf("Error creating Snapshot: %s", err) - } - - // Store the ID now - id, err := replaceVars(d, config, "{{name}}") - if err != nil { - return fmt.Errorf("Error constructing id: %s", err) - } - d.SetId(id) - project, err := getProject(d, config) if err != nil { return err } - op := &compute.Operation{} - err = Convert(res, op) + + // Build the snapshot parameter + snapshot := &compute.Snapshot{ + Name: d.Get("name").(string), + } + + source_disk := d.Get("source_disk").(string) + + if v, ok := d.GetOk("snapshot_encryption_key_raw"); ok { + snapshot.SnapshotEncryptionKey = &compute.CustomerEncryptionKey{} + snapshot.SnapshotEncryptionKey.RawKey = v.(string) + } + + if v, ok := d.GetOk("source_disk_encryption_key_raw"); ok { + snapshot.SourceDiskEncryptionKey = &compute.CustomerEncryptionKey{} + snapshot.SourceDiskEncryptionKey.RawKey = v.(string) + } + + zone, err := getZone(d, config) if err != nil { return err } - waitErr := computeOperationWaitTime( - config.clientCompute, op, project, "Creating Snapshot", - int(d.Timeout(schema.TimeoutCreate).Minutes())) - - if waitErr != nil { - // The resource didn't actually create - d.SetId("") - return fmt.Errorf("Error waiting to create Snapshot: %s", waitErr) + op, err := config.clientCompute.Disks.CreateSnapshot( + project, zone, source_disk, snapshot).Do() + if err != nil { + return fmt.Errorf("Error creating snapshot: %s", err) } - log.Printf("[DEBUG] Finished creating Snapshot %q: %#v", d.Id(), res) + // It probably maybe worked, so store the ID now + d.SetId(snapshot.Name) + timeout := int(d.Timeout(schema.TimeoutCreate).Minutes()) + err = computeOperationWaitTime(config.clientCompute, op, project, "Creating Snapshot", timeout) + if err != nil { + return err + } + + // Now if labels are set, go ahead and apply them + if labels := expandLabels(d); len(labels) > 0 { + // First, read the remote resource in order to find the fingerprint + apiSnapshot, err := config.clientCompute.Snapshots.Get(project, d.Id()).Do() + if err != nil { + return fmt.Errorf("Eror when reading snapshot for label update: %s", err) + } + + err = updateLabels(config.clientCompute, project, d.Id(), labels, apiSnapshot.LabelFingerprint, timeout) + if err != nil { + return err + } + } return resourceComputeSnapshotRead(d, meta) } func resourceComputeSnapshotRead(d *schema.ResourceData, meta interface{}) error { config := meta.(*Config) - url, err := replaceVars(d, config, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/snapshots/{{name}}") - if err != nil { - return err - } - - res, err := sendRequest(config, "GET", url, nil) - if err != nil { - return handleNotFoundError(err, d, fmt.Sprintf("ComputeSnapshot %q", d.Id())) - } - - res, err = resourceComputeSnapshotDecoder(d, meta, res) - if err != nil { - return err - } - project, err := getProject(d, config) if err != nil { return err } - if err := d.Set("project", project); err != nil { - return fmt.Errorf("Error reading Snapshot: %s", err) + + zone, err := getZone(d, config) + if err != nil { + return err } - if err := d.Set("creation_timestamp", flattenComputeSnapshotCreationTimestamp(res["creationTimestamp"], d)); err != nil { - return fmt.Errorf("Error reading Snapshot: %s", err) + snapshot, err := config.clientCompute.Snapshots.Get( + project, d.Id()).Do() + if err != nil { + return handleNotFoundError(err, d, fmt.Sprintf("Snapshot %q", d.Get("name").(string))) } - if err := d.Set("snapshot_id", flattenComputeSnapshotSnapshot_id(res["id"], d)); err != nil { - return fmt.Errorf("Error reading Snapshot: %s", err) + + d.Set("self_link", snapshot.SelfLink) + d.Set("source_disk_link", snapshot.SourceDisk) + d.Set("name", snapshot.Name) + + if snapshot.SnapshotEncryptionKey != nil && snapshot.SnapshotEncryptionKey.Sha256 != "" { + d.Set("snapshot_encryption_key_sha256", snapshot.SnapshotEncryptionKey.Sha256) } - if err := d.Set("disk_size_gb", flattenComputeSnapshotDiskSizeGb(res["diskSizeGb"], d)); err != nil { - return fmt.Errorf("Error reading Snapshot: %s", err) - } - if err := d.Set("name", flattenComputeSnapshotName(res["name"], d)); err != nil { - return fmt.Errorf("Error reading Snapshot: %s", err) - } - if err := d.Set("description", flattenComputeSnapshotDescription(res["description"], d)); err != nil { - return fmt.Errorf("Error reading Snapshot: %s", err) - } - if err := d.Set("storage_bytes", flattenComputeSnapshotStorageBytes(res["storageBytes"], d)); err != nil { - return fmt.Errorf("Error reading Snapshot: %s", err) - } - if err := d.Set("licenses", flattenComputeSnapshotLicenses(res["licenses"], d)); err != nil { - return fmt.Errorf("Error reading Snapshot: %s", err) - } - if err := d.Set("labels", flattenComputeSnapshotLabels(res["labels"], d)); err != nil { - return fmt.Errorf("Error reading Snapshot: %s", err) - } - if err := d.Set("label_fingerprint", flattenComputeSnapshotLabelFingerprint(res["labelFingerprint"], d)); err != nil { - return fmt.Errorf("Error reading Snapshot: %s", err) - } - if err := d.Set("source_disk", flattenComputeSnapshotSourceDisk(res["sourceDisk"], d)); err != nil { - return fmt.Errorf("Error reading Snapshot: %s", err) - } - if err := d.Set("snapshot_encryption_key", flattenComputeSnapshotSnapshotEncryptionKey(res["snapshotEncryptionKey"], d)); err != nil { - return fmt.Errorf("Error reading Snapshot: %s", err) - } - if err := d.Set("self_link", ConvertSelfLinkToV1(res["selfLink"].(string))); err != nil { - return fmt.Errorf("Error reading Snapshot: %s", err) + + if snapshot.SourceDiskEncryptionKey != nil && snapshot.SourceDiskEncryptionKey.Sha256 != "" { + d.Set("source_disk_encryption_key_sha256", snapshot.SourceDiskEncryptionKey.Sha256) } + d.Set("labels", snapshot.Labels) + d.Set("label_fingerprint", snapshot.LabelFingerprint) + d.Set("project", project) + d.Set("zone", zone) + return nil } func resourceComputeSnapshotUpdate(d *schema.ResourceData, meta interface{}) error { config := meta.(*Config) + project, err := getProject(d, config) + if err != nil { + return err + } + d.Partial(true) - if d.HasChange("labels") || d.HasChange("label_fingerprint") { - obj := make(map[string]interface{}) - labelsProp, err := expandComputeSnapshotLabels(d.Get("labels"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("labels"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, labelsProp)) { - obj["labels"] = labelsProp - } - labelFingerprintProp, err := expandComputeSnapshotLabelFingerprint(d.Get("label_fingerprint"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("label_fingerprint"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, labelFingerprintProp)) { - obj["labelFingerprint"] = labelFingerprintProp - } - - url, err := replaceVars(d, config, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/snapshots/{{name}}/setLabels") - if err != nil { - return err - } - res, err := sendRequest(config, "POST", url, obj) - if err != nil { - return fmt.Errorf("Error updating Snapshot %q: %s", d.Id(), err) - } - - project, err := getProject(d, config) - if err != nil { - return err - } - op := &compute.Operation{} - err = Convert(res, op) - if err != nil { - return err - } - - err = computeOperationWaitTime( - config.clientCompute, op, project, "Updating Snapshot", - int(d.Timeout(schema.TimeoutUpdate).Minutes())) - + if d.HasChange("labels") { + err = updateLabels(config.clientCompute, project, d.Id(), expandLabels(d), d.Get("label_fingerprint").(string), int(d.Timeout(schema.TimeoutDelete).Minutes())) if err != nil { return err } d.SetPartial("labels") - d.SetPartial("label_fingerprint") } d.Partial(false) @@ -536,223 +225,42 @@ func resourceComputeSnapshotUpdate(d *schema.ResourceData, meta interface{}) err func resourceComputeSnapshotDelete(d *schema.ResourceData, meta interface{}) error { config := meta.(*Config) - url, err := replaceVars(d, config, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/snapshots/{{name}}") - if err != nil { - return err - } - - var obj map[string]interface{} - log.Printf("[DEBUG] Deleting Snapshot %q", d.Id()) - res, err := sendRequest(config, "DELETE", url, obj) - if err != nil { - return handleNotFoundError(err, d, "Snapshot") - } - project, err := getProject(d, config) if err != nil { return err } - op := &compute.Operation{} - err = Convert(res, op) + + // Delete the snapshot + op, err := config.clientCompute.Snapshots.Delete( + project, d.Id()).Do() + if err != nil { + if gerr, ok := err.(*googleapi.Error); ok && gerr.Code == 404 { + log.Printf("[WARN] Removing Snapshot %q because it's gone", d.Get("name").(string)) + // The resource doesn't exist anymore + d.SetId("") + return nil + } + return fmt.Errorf("Error deleting snapshot: %s", err) + } + + err = computeOperationWaitTime(config.clientCompute, op, project, "Deleting Snapshot", int(d.Timeout(schema.TimeoutDelete).Minutes())) if err != nil { return err } - err = computeOperationWaitTime( - config.clientCompute, op, project, "Deleting Snapshot", - int(d.Timeout(schema.TimeoutDelete).Minutes())) - - if err != nil { - return err - } - - log.Printf("[DEBUG] Finished deleting Snapshot %q: %#v", d.Id(), res) + d.SetId("") return nil } -func resourceComputeSnapshotImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - config := meta.(*Config) - parseImportId([]string{"projects/(?P[^/]+)/global/snapshots/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config) - - // Replace import id for the resource id - id, err := replaceVars(d, config, "{{name}}") +func updateLabels(client *compute.Service, project string, resourceId string, labels map[string]string, labelFingerprint string, timeout int) error { + setLabelsReq := compute.GlobalSetLabelsRequest{ + Labels: labels, + LabelFingerprint: labelFingerprint, + } + op, err := client.Snapshots.SetLabels(project, resourceId, &setLabelsReq).Do() if err != nil { - return nil, fmt.Errorf("Error constructing id: %s", err) - } - d.SetId(id) - - return []*schema.ResourceData{d}, nil -} - -func flattenComputeSnapshotCreationTimestamp(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenComputeSnapshotSnapshot_id(v interface{}, d *schema.ResourceData) interface{} { - // Handles the string fixed64 format - if strVal, ok := v.(string); ok { - if intVal, err := strconv.ParseInt(strVal, 10, 64); err == nil { - return intVal - } // let terraform core handle it if we can't convert the string to an int. - } - return v -} - -func flattenComputeSnapshotDiskSizeGb(v interface{}, d *schema.ResourceData) interface{} { - // Handles the string fixed64 format - if strVal, ok := v.(string); ok { - if intVal, err := strconv.ParseInt(strVal, 10, 64); err == nil { - return intVal - } // let terraform core handle it if we can't convert the string to an int. - } - return v -} - -func flattenComputeSnapshotName(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenComputeSnapshotDescription(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenComputeSnapshotStorageBytes(v interface{}, d *schema.ResourceData) interface{} { - // Handles the string fixed64 format - if strVal, ok := v.(string); ok { - if intVal, err := strconv.ParseInt(strVal, 10, 64); err == nil { - return intVal - } // let terraform core handle it if we can't convert the string to an int. - } - return v -} - -func flattenComputeSnapshotLicenses(v interface{}, d *schema.ResourceData) interface{} { - if v == nil { - return v - } - return convertAndMapStringArr(v.([]interface{}), ConvertSelfLinkToV1) -} - -func flattenComputeSnapshotLabels(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenComputeSnapshotLabelFingerprint(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenComputeSnapshotSourceDisk(v interface{}, d *schema.ResourceData) interface{} { - if v == nil { - return v - } - return NameFromSelfLinkStateFunc(v) -} - -func flattenComputeSnapshotSnapshotEncryptionKey(v interface{}, d *schema.ResourceData) interface{} { - if v == nil { - return nil - } - original := v.(map[string]interface{}) - if len(original) == 0 { - return nil - } - transformed := make(map[string]interface{}) - transformed["raw_key"] = - flattenComputeSnapshotSnapshotEncryptionKeyRawKey(original["rawKey"], d) - transformed["sha256"] = - flattenComputeSnapshotSnapshotEncryptionKeySha256(original["sha256"], d) - return []interface{}{transformed} -} -func flattenComputeSnapshotSnapshotEncryptionKeyRawKey(v interface{}, d *schema.ResourceData) interface{} { - return d.Get("snapshot_encryption_key.0.raw_key") -} - -func flattenComputeSnapshotSnapshotEncryptionKeySha256(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func expandComputeSnapshotName(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandComputeSnapshotDescription(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandComputeSnapshotLabels(v interface{}, d *schema.ResourceData, config *Config) (map[string]string, error) { - if v == nil { - return map[string]string{}, nil - } - m := make(map[string]string) - for k, val := range v.(map[string]interface{}) { - m[k] = val.(string) - } - return m, nil -} - -func expandComputeSnapshotLabelFingerprint(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandComputeSnapshotSourceDisk(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - f, err := parseZonalFieldValue("disks", v.(string), "project", "zone", d, config, true) - if err != nil { - return nil, fmt.Errorf("Invalid value for source_disk: %s", err) - } - return f.RelativeLink(), nil -} - -func expandComputeSnapshotZone(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - f, err := parseGlobalFieldValue("zones", v.(string), "project", d, config, true) - if err != nil { - return nil, fmt.Errorf("Invalid value for zone: %s", err) - } - return f.RelativeLink(), nil -} - -func expandComputeSnapshotSnapshotEncryptionKey(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - l := v.([]interface{}) - req := make([]interface{}, 0, 1) - if len(l) == 1 && l[0].(map[string]interface{})["raw_key"] != "" { - // There is a value - outMap := make(map[string]interface{}) - outMap["rawKey"] = l[0].(map[string]interface{})["raw_key"] - req = append(req, outMap) - } else { - // Check alternative setting? - if altV, ok := d.GetOk("snapshot_encryption_key_raw"); ok && altV != "" { - outMap := make(map[string]interface{}) - outMap["rawKey"] = altV - req = append(req, outMap) - } - } - return req, nil -} - -func expandComputeSnapshotSourceDiskEncryptionKey(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - l := v.([]interface{}) - req := make([]interface{}, 0, 1) - if len(l) == 1 { - // There is a value - outMap := make(map[string]interface{}) - outMap["rawKey"] = l[0].(map[string]interface{})["raw_key"] - req = append(req, outMap) - } else { - // Check alternative setting? - if altV, ok := d.GetOk("source_disk_encryption_key_raw"); ok && altV != "" { - outMap := make(map[string]interface{}) - outMap["rawKey"] = altV - req = append(req, outMap) - } - } - return req, nil -} - -func resourceComputeSnapshotDecoder(d *schema.ResourceData, meta interface{}, res map[string]interface{}) (map[string]interface{}, error) { - d.Set("source_disk_link", ConvertSelfLinkToV1(res["sourceDisk"].(string))) - if snapshotEncryptionKey := res["snapshotEncryptionKey"]; snapshotEncryptionKey != nil { - d.Set("snapshot_encryption_key_sha256", snapshotEncryptionKey.((map[string]interface{}))["sha256"]) + return err } - return res, nil + return computeOperationWaitTime(client, op, project, "Setting labels on snapshot", timeout) } diff --git a/google/resource_compute_snapshot_test.go b/google/resource_compute_snapshot_test.go index 8d3d253b..db36a3cc 100644 --- a/google/resource_compute_snapshot_test.go +++ b/google/resource_compute_snapshot_test.go @@ -2,7 +2,6 @@ package google import ( "fmt" - "regexp" "testing" "reflect" @@ -68,7 +67,7 @@ func TestAccComputeSnapshot_update(t *testing.T) { }) } -func TestAccComputeSnapshot_encryptionBasic(t *testing.T) { +func TestAccComputeSnapshot_encryption(t *testing.T) { t.Parallel() snapshotName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) @@ -91,321 +90,6 @@ func TestAccComputeSnapshot_encryptionBasic(t *testing.T) { }) } -func TestAccComputeSnapshot_encryptionModify(t *testing.T) { - t.Parallel() - - snapshotName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var snapshot compute.Snapshot - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeSnapshotDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeSnapshot_encryption(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionDelta(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - }, - }) -} - -func TestAccComputeSnapshot_encryptionModifyBad(t *testing.T) { - t.Parallel() - - snapshotName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var snapshot compute.Snapshot - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeSnapshotDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeSnapshot_encryption(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionDeltaBad(snapshotName, diskName), - ExpectError: regexp.MustCompile("customerEncryptionKeyIsIncorrect"), - }, - }, - }) -} - -func TestAccComputeSnapshot_encryptionOld(t *testing.T) { - t.Parallel() - - snapshotName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var snapshot compute.Snapshot - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeSnapshotDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionOld(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - }, - }) -} - -func TestAccComputeSnapshot_encryptionUpgrade(t *testing.T) { - t.Parallel() - - snapshotName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var snapshot compute.Snapshot - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeSnapshotDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionOld(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - resource.TestStep{ - Config: testAccComputeSnapshot_encryption(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - }, - }) -} - -func TestAccComputeSnapshot_encryptionUpgradeModify(t *testing.T) { - t.Parallel() - - snapshotName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var snapshot compute.Snapshot - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeSnapshotDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionOld(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionDelta(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - }, - }) -} - -func TestAccComputeSnapshot_encryptionUpgradeModifyBad(t *testing.T) { - t.Parallel() - - snapshotName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var snapshot compute.Snapshot - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeSnapshotDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionOld(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionDeltaBad(snapshotName, diskName), - ExpectError: regexp.MustCompile("customerEncryptionKeyIsIncorrect"), - }, - }, - }) -} - -func TestAccComputeSnapshot_encryptionDowngrade(t *testing.T) { - t.Parallel() - - snapshotName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var snapshot compute.Snapshot - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeSnapshotDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeSnapshot_encryption(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionOldGuarded(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - }, - }) -} - -func TestAccComputeSnapshot_encryptionDowngradeModify(t *testing.T) { - t.Parallel() - - snapshotName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var snapshot compute.Snapshot - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeSnapshotDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeSnapshot_encryption(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionOldDelta1(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionOldDelta2(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - }, - }) -} - -func TestAccComputeSnapshot_encryptionDowngradeModifyBad(t *testing.T) { - t.Parallel() - - snapshotName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var snapshot compute.Snapshot - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeSnapshotDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeSnapshot_encryption(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionOldDeltaBad(snapshotName, diskName), - ExpectError: regexp.MustCompile("customerEncryptionKeyIsIncorrect"), - }, - }, - }) -} - -func TestAccComputeSnapshot_encryptionOldRemove(t *testing.T) { - t.Parallel() - - snapshotName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var snapshot compute.Snapshot - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeSnapshotDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionOld(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionNone(snapshotName, diskName), - ExpectError: regexp.MustCompile("resourceIsEncryptedWithCustomerEncryptionKey"), - }, - }, - }) -} - -func TestAccComputeSnapshot_encryptionRemove(t *testing.T) { - t.Parallel() - - snapshotName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - var snapshot compute.Snapshot - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckComputeSnapshotDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccComputeSnapshot_encryption(snapshotName, diskName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeSnapshotExists( - "google_compute_snapshot.foobar", &snapshot), - ), - }, - resource.TestStep{ - Config: testAccComputeSnapshot_encryptionNone(snapshotName, diskName), - ExpectError: regexp.MustCompile("resourceIsEncryptedWithCustomerEncryptionKey"), - }, - }, - }) -} - func testAccCheckComputeSnapshotDestroy(s *terraform.State) error { config := testAccProvider.Meta().(*Config) @@ -564,39 +248,6 @@ resource "google_compute_disk" "foobar" { zone = "us-central1-a" disk_encryption_key_raw = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" } - -resource "google_compute_snapshot" "foobar" { - name = "%s" - source_disk = "${google_compute_disk.foobar.name}" - zone = "us-central1-a" - snapshot_encryption_key { - raw_key = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" - } - - source_disk_encryption_key { - raw_key = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" - } -}`, diskName, snapshotName) -} - -func testAccComputeSnapshot_encryptionOld(snapshotName string, diskName string) string { - return fmt.Sprintf(` -data "google_compute_image" "my_image" { - family = "debian-9" - project = "debian-cloud" -} - -resource "google_compute_disk" "foobar" { - name = "%s" - image = "${data.google_compute_image.my_image.self_link}" - size = 10 - type = "pd-ssd" - zone = "us-central1-a" - disk_encryption_key { - raw_key = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" - } -} - resource "google_compute_snapshot" "foobar" { name = "%s" source_disk = "${google_compute_disk.foobar.name}" @@ -605,219 +256,3 @@ resource "google_compute_snapshot" "foobar" { snapshot_encryption_key_raw = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" }`, diskName, snapshotName) } - -func testAccComputeSnapshot_encryptionOldGuarded(snapshotName string, diskName string) string { - return fmt.Sprintf(` -data "google_compute_image" "my_image" { - family = "debian-9" - project = "debian-cloud" -} - -resource "google_compute_disk" "foobar" { - name = "%s" - image = "${data.google_compute_image.my_image.self_link}" - size = 10 - type = "pd-ssd" - zone = "us-central1-a" - disk_encryption_key { - raw_key = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" - } -} - -resource "google_compute_snapshot" "foobar" { - name = "%s" - source_disk = "${google_compute_disk.foobar.name}" - zone = "us-central1-a" - snapshot_encryption_key { - raw_key = "" - } - - source_disk_encryption_key_raw = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" - snapshot_encryption_key_raw = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" -}`, diskName, snapshotName) -} - -func testAccComputeSnapshot_encryptionDelta(snapshotName string, diskName string) string { - return fmt.Sprintf(` -data "google_compute_image" "my_image" { - family = "debian-9" - project = "debian-cloud" -} - -resource "google_compute_disk" "foobar" { - name = "%s" - image = "${data.google_compute_image.my_image.self_link}" - size = 10 - type = "pd-ssd" - zone = "us-central1-a" - disk_encryption_key { - raw_key = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" - } -} - -resource "google_compute_snapshot" "foobar" { - name = "%s" - source_disk = "${google_compute_disk.foobar.name}" - zone = "us-central1-a" - snapshot_encryption_key { - raw_key = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" - } - - source_disk_encryption_key { - raw_key = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" - } -}`, diskName, snapshotName) -} - -func testAccComputeSnapshot_encryptionOldDelta1(snapshotName string, diskName string) string { - return fmt.Sprintf(` -data "google_compute_image" "my_image" { - family = "debian-9" - project = "debian-cloud" -} - -resource "google_compute_disk" "foobar" { - name = "%s" - image = "${data.google_compute_image.my_image.self_link}" - size = 10 - type = "pd-ssd" - zone = "us-central1-a" - disk_encryption_key { - raw_key = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" - } -} - -resource "google_compute_snapshot" "foobar" { - name = "%s" - source_disk = "${google_compute_disk.foobar.name}" - zone = "us-central1-a" - snapshot_encryption_key { - raw_key = "" - } - - source_disk_encryption_key { - raw_key = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" - } - - snapshot_encryption_key_raw = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" -}`, diskName, snapshotName) -} - -func testAccComputeSnapshot_encryptionOldDelta2(snapshotName string, diskName string) string { - return fmt.Sprintf(` -data "google_compute_image" "my_image" { - family = "debian-9" - project = "debian-cloud" -} - -resource "google_compute_disk" "foobar" { - name = "%s" - image = "${data.google_compute_image.my_image.self_link}" - size = 10 - type = "pd-ssd" - zone = "us-central1-a" - disk_encryption_key { - raw_key = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" - } -} - -resource "google_compute_snapshot" "foobar" { - name = "%s" - source_disk = "${google_compute_disk.foobar.name}" - zone = "us-central1-a" - snapshot_encryption_key { - raw_key = "" - } - - source_disk_encryption_key_raw = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" - snapshot_encryption_key_raw = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" -}`, diskName, snapshotName) -} - -func testAccComputeSnapshot_encryptionDeltaBad(snapshotName string, diskName string) string { - return fmt.Sprintf(` -data "google_compute_image" "my_image" { - family = "debian-9" - project = "debian-cloud" -} - -resource "google_compute_disk" "foobar" { - name = "%s" - image = "${data.google_compute_image.my_image.self_link}" - size = 10 - type = "pd-ssd" - zone = "us-central1-a" - disk_encryption_key { - raw_key = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" - } -} - -resource "google_compute_snapshot" "foobar" { - name = "%s" - source_disk = "${google_compute_disk.foobar.name}" - zone = "us-central1-a" - snapshot_encryption_key { - raw_key = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" - } - - source_disk_encryption_key { - raw_key = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" - } -}`, diskName, snapshotName) -} - -func testAccComputeSnapshot_encryptionOldDeltaBad(snapshotName string, diskName string) string { - return fmt.Sprintf(` -data "google_compute_image" "my_image" { - family = "debian-9" - project = "debian-cloud" -} - -resource "google_compute_disk" "foobar" { - name = "%s" - image = "${data.google_compute_image.my_image.self_link}" - size = 10 - type = "pd-ssd" - zone = "us-central1-a" - disk_encryption_key { - raw_key = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" - } -} - -resource "google_compute_snapshot" "foobar" { - name = "%s" - source_disk = "${google_compute_disk.foobar.name}" - zone = "us-central1-a" - snapshot_encryption_key { - raw_key = "" - } - - source_disk_encryption_key_raw = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" - snapshot_encryption_key_raw = "Sznt5GBBAJky3BgBVbDOMLY3TlStz7RikXujsFQ0GlA=" -}`, diskName, snapshotName) -} - -func testAccComputeSnapshot_encryptionNone(snapshotName string, diskName string) string { - return fmt.Sprintf(` -data "google_compute_image" "my_image" { - family = "debian-9" - project = "debian-cloud" -} - -resource "google_compute_disk" "foobar" { - name = "%s" - image = "${data.google_compute_image.my_image.self_link}" - size = 10 - type = "pd-ssd" - zone = "us-central1-a" - disk_encryption_key { - raw_key = "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" - } -} - -resource "google_compute_snapshot" "foobar" { - name = "%s" - source_disk = "${google_compute_disk.foobar.name}" - zone = "us-central1-a" -}`, diskName, snapshotName) -} diff --git a/google/resource_compute_ssl_certificate_generated_test.go b/google/resource_compute_ssl_certificate_generated_test.go index 53ed424c..eea2d517 100644 --- a/google/resource_compute_ssl_certificate_generated_test.go +++ b/google/resource_compute_ssl_certificate_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeSslCertificate_sslCertificateBasicExample(t *testing.T) { @@ -199,25 +198,3 @@ resource "google_compute_http_health_check" "default" { `, val, val, val, val, ) } - -func testAccCheckComputeSslCertificateDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_ssl_certificate" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/sslCertificates/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeSslCertificate still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_ssl_certificate_test.go b/google/resource_compute_ssl_certificate_test.go index 6add6288..46a2705c 100644 --- a/google/resource_compute_ssl_certificate_test.go +++ b/google/resource_compute_ssl_certificate_test.go @@ -84,6 +84,24 @@ func TestAccComputeSslCertificate_name_prefix(t *testing.T) { }) } +func testAccCheckComputeSslCertificateDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_ssl_certificate" { + continue + } + + _, err := config.clientCompute.SslCertificates.Get( + config.Project, rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("SslCertificate still exists") + } + } + + return nil +} + func testAccCheckComputeSslCertificateExists(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_ssl_policy_generated_test.go b/google/resource_compute_ssl_policy_generated_test.go index deaf3f4a..b02c502a 100644 --- a/google/resource_compute_ssl_policy_generated_test.go +++ b/google/resource_compute_ssl_policy_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeSslPolicy_sslPolicyBasicExample(t *testing.T) { @@ -65,25 +64,3 @@ resource "google_compute_ssl_policy" "custom-ssl-policy" { `, val, val, val, ) } - -func testAccCheckComputeSslPolicyDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_ssl_policy" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/sslPolicies/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeSslPolicy still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_ssl_policy_test.go b/google/resource_compute_ssl_policy_test.go index 3daa97d8..66843746 100644 --- a/google/resource_compute_ssl_policy_test.go +++ b/google/resource_compute_ssl_policy_test.go @@ -308,6 +308,24 @@ func testAccCheckComputeSslPolicyExists(n string, sslPolicy *compute.SslPolicy) } } +func testAccCheckComputeSslPolicyDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_ssl_policy" { + continue + } + + _, err := config.clientCompute.SslPolicies.Get( + config.Project, rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("SSL Policy still exists") + } + } + + return nil +} + func testAccComputeSslPolicyBasic(resourceName string) string { return fmt.Sprintf(` resource "google_compute_ssl_policy" "basic" { diff --git a/google/resource_compute_subnetwork_generated_test.go b/google/resource_compute_subnetwork_generated_test.go index 1bfc2907..5f3efed5 100644 --- a/google/resource_compute_subnetwork_generated_test.go +++ b/google/resource_compute_subnetwork_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeSubnetwork_subnetworkBasicExample(t *testing.T) { @@ -63,25 +62,3 @@ resource "google_compute_network" "custom-test" { `, val, val, ) } - -func testAccCheckComputeSubnetworkDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_subnetwork" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/regions/{{region}}/subnetworks/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeSubnetwork still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_subnetwork_test.go b/google/resource_compute_subnetwork_test.go index e3e7854d..a5ab1dde 100644 --- a/google/resource_compute_subnetwork_test.go +++ b/google/resource_compute_subnetwork_test.go @@ -216,6 +216,25 @@ func TestAccComputeSubnetwork_flowLogs(t *testing.T) { }) } +func testAccCheckComputeSubnetworkDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_subnetwork" { + continue + } + + region, subnet_name := splitSubnetID(rs.Primary.ID) + _, err := config.clientCompute.Subnetworks.Get( + config.Project, region, subnet_name).Do() + if err == nil { + return fmt.Errorf("Network still exists") + } + } + + return nil +} + func testAccCheckComputeSubnetworkExists(n string, subnetwork *compute.Subnetwork) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_target_http_proxy_generated_test.go b/google/resource_compute_target_http_proxy_generated_test.go index 745eea08..c9825298 100644 --- a/google/resource_compute_target_http_proxy_generated_test.go +++ b/google/resource_compute_target_http_proxy_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeTargetHttpProxy_targetHttpProxyBasicExample(t *testing.T) { @@ -88,25 +87,3 @@ resource "google_compute_http_health_check" "default" { `, val, val, val, val, ) } - -func testAccCheckComputeTargetHttpProxyDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_target_http_proxy" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/targetHttpProxies/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeTargetHttpProxy still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_target_http_proxy_test.go b/google/resource_compute_target_http_proxy_test.go index 33d33167..cd77c598 100644 --- a/google/resource_compute_target_http_proxy_test.go +++ b/google/resource_compute_target_http_proxy_test.go @@ -72,6 +72,24 @@ func TestAccComputeTargetHttpProxy_update(t *testing.T) { }) } +func testAccCheckComputeTargetHttpProxyDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_target_http_proxy" { + continue + } + + _, err := config.clientCompute.TargetHttpProxies.Get( + config.Project, rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("TargetHttpProxy still exists") + } + } + + return nil +} + func testAccCheckComputeTargetHttpProxyExists(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_target_https_proxy_generated_test.go b/google/resource_compute_target_https_proxy_generated_test.go index 216633c3..047d2e70 100644 --- a/google/resource_compute_target_https_proxy_generated_test.go +++ b/google/resource_compute_target_https_proxy_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeTargetHttpsProxy_targetHttpsProxyBasicExample(t *testing.T) { @@ -97,25 +96,3 @@ resource "google_compute_http_health_check" "default" { `, val, val, val, val, val, ) } - -func testAccCheckComputeTargetHttpsProxyDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_target_https_proxy" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/targetHttpsProxies/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeTargetHttpsProxy still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_target_https_proxy_test.go b/google/resource_compute_target_https_proxy_test.go index 834606d1..7a8d62dc 100644 --- a/google/resource_compute_target_https_proxy_test.go +++ b/google/resource_compute_target_https_proxy_test.go @@ -78,6 +78,24 @@ func TestAccComputeTargetHttpsProxy_update(t *testing.T) { }) } +func testAccCheckComputeTargetHttpsProxyDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_target_https_proxy" { + continue + } + + _, err := config.clientCompute.TargetHttpsProxies.Get( + config.Project, rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("TargetHttpsProxy still exists") + } + } + + return nil +} + func testAccCheckComputeTargetHttpsProxyExists(n string, proxy *compute.TargetHttpsProxy) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_target_ssl_proxy_generated_test.go b/google/resource_compute_target_ssl_proxy_generated_test.go index 4dd05295..a0ed4260 100644 --- a/google/resource_compute_target_ssl_proxy_generated_test.go +++ b/google/resource_compute_target_ssl_proxy_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeTargetSslProxy_targetSslProxyBasicExample(t *testing.T) { @@ -74,25 +73,3 @@ resource "google_compute_health_check" "default" { `, val, val, val, val, ) } - -func testAccCheckComputeTargetSslProxyDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_target_ssl_proxy" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/targetSslProxies/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeTargetSslProxy still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_target_ssl_proxy_test.go b/google/resource_compute_target_ssl_proxy_test.go index a32239e8..b55b771b 100644 --- a/google/resource_compute_target_ssl_proxy_test.go +++ b/google/resource_compute_target_ssl_proxy_test.go @@ -69,6 +69,24 @@ func TestAccComputeTargetSslProxy_update(t *testing.T) { }) } +func testAccCheckComputeTargetSslProxyDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_target_ssl_proxy" { + continue + } + + _, err := config.clientCompute.TargetSslProxies.Get( + config.Project, rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("TargetSslProxy still exists") + } + } + + return nil +} + func testAccCheckComputeTargetSslProxy(n, proxyHeader, sslCert string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_target_tcp_proxy_generated_test.go b/google/resource_compute_target_tcp_proxy_generated_test.go index f9fcde16..6f671e4f 100644 --- a/google/resource_compute_target_tcp_proxy_generated_test.go +++ b/google/resource_compute_target_tcp_proxy_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeTargetTcpProxy_targetTcpProxyBasicExample(t *testing.T) { @@ -70,25 +69,3 @@ resource "google_compute_health_check" "default" { `, val, val, val, ) } - -func testAccCheckComputeTargetTcpProxyDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_target_tcp_proxy" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/targetTcpProxies/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeTargetTcpProxy still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_target_tcp_proxy_test.go b/google/resource_compute_target_tcp_proxy_test.go index ec4cc4f2..dfbbf7dd 100644 --- a/google/resource_compute_target_tcp_proxy_test.go +++ b/google/resource_compute_target_tcp_proxy_test.go @@ -67,6 +67,24 @@ func TestAccComputeTargetTcpProxy_update(t *testing.T) { }) } +func testAccCheckComputeTargetTcpProxyDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_target_tcp_proxy" { + continue + } + + _, err := config.clientCompute.TargetTcpProxies.Get( + config.Project, rs.Primary.ID).Do() + if err == nil { + return fmt.Errorf("TargetTcpProxy still exists") + } + } + + return nil +} + func testAccCheckComputeTargetTcpProxyExists(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_vpn_gateway_generated_test.go b/google/resource_compute_vpn_gateway_generated_test.go index 2916436d..df26c673 100644 --- a/google/resource_compute_vpn_gateway_generated_test.go +++ b/google/resource_compute_vpn_gateway_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeVpnGateway_targetVpnGatewayBasicExample(t *testing.T) { @@ -106,25 +105,3 @@ resource "google_compute_route" "route1" { `, val, val, val, val, val, val, val, val, ) } - -func testAccCheckComputeVpnGatewayDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_vpn_gateway" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/regions/{{region}}/targetVpnGateways/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeVpnGateway still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_vpn_gateway_test.go b/google/resource_compute_vpn_gateway_test.go index a111a417..c922af91 100644 --- a/google/resource_compute_vpn_gateway_test.go +++ b/google/resource_compute_vpn_gateway_test.go @@ -32,6 +32,31 @@ func TestAccComputeVpnGateway_basic(t *testing.T) { }) } +func testAccCheckComputeVpnGatewayDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + project := config.Project + + vpnGatewaysService := compute.NewTargetVpnGatewaysService(config.clientCompute) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_network" { + continue + } + + region := rs.Primary.Attributes["region"] + name := rs.Primary.Attributes["name"] + + _, err := vpnGatewaysService.Get(project, region, name).Do() + + if err == nil { + return fmt.Errorf("Error, VPN Gateway %s in region %s still exists", + name, region) + } + } + + return nil +} + func testAccCheckComputeVpnGatewayExists(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/google/resource_compute_vpn_tunnel_generated_test.go b/google/resource_compute_vpn_tunnel_generated_test.go index 488218e4..8d4efd0c 100644 --- a/google/resource_compute_vpn_tunnel_generated_test.go +++ b/google/resource_compute_vpn_tunnel_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccComputeVpnTunnel_vpnTunnelBasicExample(t *testing.T) { @@ -107,25 +106,3 @@ resource "google_compute_route" "route1" { `, val, val, val, val, val, val, val, val, ) } - -func testAccCheckComputeVpnTunnelDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_compute_vpn_tunnel" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/compute/v1/projects/{{project}}/regions/{{region}}/vpnTunnels/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("ComputeVpnTunnel still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_compute_vpn_tunnel_test.go b/google/resource_compute_vpn_tunnel_test.go index eed67655..a363942a 100644 --- a/google/resource_compute_vpn_tunnel_test.go +++ b/google/resource_compute_vpn_tunnel_test.go @@ -6,6 +6,9 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" + + "google.golang.org/api/compute/v1" ) func TestAccComputeVpnTunnel_basic(t *testing.T) { @@ -72,6 +75,31 @@ func TestAccComputeVpnTunnel_defaultTrafficSelectors(t *testing.T) { }) } +func testAccCheckComputeVpnTunnelDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + project := config.Project + + vpnTunnelsService := compute.NewVpnTunnelsService(config.clientCompute) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_network" { + continue + } + + region := rs.Primary.Attributes["region"] + name := rs.Primary.Attributes["name"] + + _, err := vpnTunnelsService.Get(project, region, name).Do() + + if err == nil { + return fmt.Errorf("Error, VPN Tunnel %s in region %s still exists", + name, region) + } + } + + return nil +} + func testAccComputeVpnTunnel_basic() string { return fmt.Sprintf(` resource "google_compute_network" "foobar" { diff --git a/google/resource_container_cluster.go b/google/resource_container_cluster.go index 88a6b761..e686f9e6 100644 --- a/google/resource_container_cluster.go +++ b/google/resource_container_cluster.go @@ -97,6 +97,7 @@ func resourceContainerCluster() *schema.Resource { }, "region": { + Deprecated: "This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", Type: schema.TypeString, Optional: true, Computed: true, @@ -186,41 +187,6 @@ func resourceContainerCluster() *schema.Resource { }, }, - "cluster_autoscaling": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, - Removed: "This field is in beta. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Required: true, - }, - "resource_limits": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "resource_type": { - Type: schema.TypeString, - Required: true, - }, - "minimum": { - Type: schema.TypeInt, - Optional: true, - }, - "maximum": { - Type: schema.TypeInt, - Optional: true, - }, - }, - }, - }, - }, - }, - }, - "cluster_ipv4_cidr": { Type: schema.TypeString, Optional: true, @@ -539,58 +505,19 @@ func resourceContainerCluster() *schema.Resource { }, "private_cluster": { - Deprecated: "Use private_cluster_config.enable_private_nodes instead.", - ConflictsWith: []string{"private_cluster_config"}, - Computed: true, - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - - "private_cluster_config": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Computed: true, - ConflictsWith: []string{"private_cluster", "master_ipv4_cidr_block"}, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enable_private_endpoint": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - "enable_private_nodes": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - }, - "master_ipv4_cidr_block": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.CIDRNetwork(28, 28), - }, - "private_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - "public_endpoint": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, + Deprecated: "This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + Default: false, }, "master_ipv4_cidr_block": { - Deprecated: "This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", - Type: schema.TypeString, - ConflictsWith: []string{"private_cluster_config"}, - Computed: true, - Optional: true, - ForceNew: true, - ValidateFunc: validation.CIDRNetwork(28, 28), + Deprecated: "This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.CIDRNetwork(28, 28), }, "resource_labels": { @@ -724,10 +651,6 @@ func resourceContainerClusterCreate(d *schema.ResourceData, meta interface{}) er } } - if v, ok := d.GetOk("private_cluster_config"); ok { - cluster.PrivateClusterConfig = expandPrivateClusterConfig(v) - } - req := &containerBeta.CreateClusterRequest{ Cluster: cluster, } @@ -736,11 +659,7 @@ func resourceContainerClusterCreate(d *schema.ResourceData, meta interface{}) er defer mutexKV.Unlock(containerClusterMutexKey(project, location, clusterName)) parent := fmt.Sprintf("projects/%s/locations/%s", project, location) - var op interface{} - err = retry(func() error { - op, err = config.clientContainerBeta.Projects.Locations.Clusters.Create(parent, req).Do() - return err - }) + op, err := config.clientContainerBeta.Projects.Locations.Clusters.Create(parent, req).Do() if err != nil { return err } @@ -835,9 +754,6 @@ func resourceContainerClusterRead(d *schema.ResourceData, meta interface{}) erro d.Set("network", cluster.NetworkConfig.Network) d.Set("subnetwork", cluster.NetworkConfig.Subnetwork) d.Set("enable_binary_authorization", cluster.BinaryAuthorization != nil && cluster.BinaryAuthorization.Enabled) - if err := d.Set("cluster_autoscaling", nil); err != nil { - return err - } if err := d.Set("node_config", flattenNodeConfig(cluster.NodeConfig)); err != nil { return err } @@ -857,10 +773,6 @@ func resourceContainerClusterRead(d *schema.ResourceData, meta interface{}) erro return err } - if err := d.Set("private_cluster_config", flattenPrivateClusterConfig(cluster.PrivateClusterConfig)); err != nil { - return err - } - igUrls, err := getInstanceGroupUrlsFromManagerUrls(config, cluster.InstanceGroupUrls) if err != nil { return err @@ -1597,20 +1509,6 @@ func expandNetworkPolicy(configured interface{}) *containerBeta.NetworkPolicy { return result } -func expandPrivateClusterConfig(configured interface{}) *containerBeta.PrivateClusterConfig { - l := configured.([]interface{}) - if len(l) == 0 { - return nil - } - config := l[0].(map[string]interface{}) - return &containerBeta.PrivateClusterConfig{ - EnablePrivateEndpoint: config["enable_private_endpoint"].(bool), - EnablePrivateNodes: config["enable_private_nodes"].(bool), - MasterIpv4CidrBlock: config["master_ipv4_cidr_block"].(string), - ForceSendFields: []string{"EnablePrivateEndpoint", "EnablePrivateNodes", "MasterIpv4CidrBlock"}, - } -} - func expandPodSecurityPolicyConfig(configured interface{}) *containerBeta.PodSecurityPolicyConfig { l := configured.([]interface{}) if len(l) == 0 || l[0] == nil { @@ -1692,21 +1590,6 @@ func flattenClusterNodePools(d *schema.ResourceData, config *Config, c []*contai return nodePools, nil } -func flattenPrivateClusterConfig(c *containerBeta.PrivateClusterConfig) []map[string]interface{} { - if c == nil { - return nil - } - return []map[string]interface{}{ - { - "enable_private_endpoint": c.EnablePrivateEndpoint, - "enable_private_nodes": c.EnablePrivateNodes, - "master_ipv4_cidr_block": c.MasterIpv4CidrBlock, - "private_endpoint": c.PrivateEndpoint, - "public_endpoint": c.PublicEndpoint, - }, - } -} - func flattenIPAllocationPolicy(c *containerBeta.IPAllocationPolicy) []map[string]interface{} { if c == nil { return nil diff --git a/google/resource_container_cluster_test.go b/google/resource_container_cluster_test.go index 283dd967..8b7a2c76 100644 --- a/google/resource_container_cluster_test.go +++ b/google/resource_container_cluster_test.go @@ -512,29 +512,6 @@ func TestAccContainerCluster_withPrivateCluster(t *testing.T) { }) } -func TestAccContainerCluster_withPrivateClusterConfig(t *testing.T) { - t.Parallel() - - clusterName := fmt.Sprintf("cluster-test-%s", acctest.RandString(10)) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckContainerClusterDestroy, - Steps: []resource.TestStep{ - { - Config: testAccContainerCluster_withPrivateClusterConfig(clusterName), - }, - { - ResourceName: "google_container_cluster.with_private_cluster", - ImportStateIdPrefix: "us-central1-a/", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - func TestAccContainerCluster_withLegacyAbac(t *testing.T) { t.Parallel() @@ -2501,52 +2478,6 @@ resource "google_container_cluster" "with_private_cluster" { }`, clusterName, clusterName) } -func testAccContainerCluster_withPrivateClusterConfig(clusterName string) string { - return fmt.Sprintf(` -resource "google_compute_network" "container_network" { - name = "container-net-%s" - auto_create_subnetworks = false -} - -resource "google_compute_subnetwork" "container_subnetwork" { - name = "${google_compute_network.container_network.name}" - network = "${google_compute_network.container_network.name}" - ip_cidr_range = "10.0.36.0/24" - region = "us-central1" - private_ip_google_access = true - - secondary_ip_range { - range_name = "pod" - ip_cidr_range = "10.0.0.0/19" - } - - secondary_ip_range { - range_name = "svc" - ip_cidr_range = "10.0.32.0/22" - } -} - -resource "google_container_cluster" "with_private_cluster" { - name = "cluster-test-%s" - zone = "us-central1-a" - initial_node_count = 1 - - network = "${google_compute_network.container_network.name}" - subnetwork = "${google_compute_subnetwork.container_subnetwork.name}" - - private_cluster_config { - enable_private_endpoint = true - enable_private_nodes = true - master_ipv4_cidr_block = "10.42.0.0/28" - } - master_authorized_networks_config { cidr_blocks = [] } - ip_allocation_policy { - cluster_secondary_range_name = "${google_compute_subnetwork.container_subnetwork.secondary_ip_range.0.range_name}" - services_secondary_range_name = "${google_compute_subnetwork.container_subnetwork.secondary_ip_range.1.range_name}" - } -}`, clusterName, clusterName) -} - func testAccContainerCluster_sharedVpc(org, billingId, projectName, name string) string { return fmt.Sprintf(` resource "google_project" "host_project" { diff --git a/google/resource_container_node_pool.go b/google/resource_container_node_pool.go index 854c4737..009fc788 100644 --- a/google/resource_container_node_pool.go +++ b/google/resource_container_node_pool.go @@ -54,9 +54,10 @@ func resourceContainerNodePool() *schema.Resource { ForceNew: true, }, "region": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Deprecated: "This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.", + Type: schema.TypeString, + Optional: true, + ForceNew: true, }, }), } diff --git a/google/resource_dataproc_job.go b/google/resource_dataproc_job.go index 99a00d87..6a5ef347 100644 --- a/google/resource_dataproc_job.go +++ b/google/resource_dataproc_job.go @@ -251,13 +251,6 @@ func resourceDataprocJobCreate(d *schema.ResourceData, meta interface{}) error { } d.SetId(job.Reference.JobId) - timeoutInMinutes := int(d.Timeout(schema.TimeoutCreate).Minutes()) - waitErr := dataprocJobOperationWait(config, region, project, job.Reference.JobId, - "Creating Dataproc job", timeoutInMinutes, 1) - if waitErr != nil { - return waitErr - } - log.Printf("[INFO] Dataproc job %s has been submitted", job.Reference.JobId) return resourceDataprocJobRead(d, meta) } diff --git a/google/resource_google_billing_account_iam_test.go b/google/resource_google_billing_account_iam_test.go deleted file mode 100644 index 60bbdc30..00000000 --- a/google/resource_google_billing_account_iam_test.go +++ /dev/null @@ -1,178 +0,0 @@ -package google - -import ( - "fmt" - "reflect" - "sort" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" -) - -func TestAccBillingAccountIam(t *testing.T) { - t.Parallel() - - billing := getTestBillingAccountFromEnv(t) - account := acctest.RandomWithPrefix("tf-test") - role := "roles/billing.viewer" - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - Steps: []resource.TestStep{ - { - // Test Iam Binding creation - Config: testAccBillingAccountIamBinding_basic(account, billing, role), - Check: testAccCheckGoogleBillingAccountIamBindingExists("foo", role, []string{ - fmt.Sprintf("serviceAccount:%s@%s.iam.gserviceaccount.com", account, getTestProjectFromEnv()), - }), - }, - { - ResourceName: "google_billing_account_iam_binding.foo", - ImportStateId: fmt.Sprintf("%s roles/billing.viewer", billing), - ImportState: true, - ImportStateVerify: true, - }, - { - // Test Iam Binding update - Config: testAccBillingAccountIamBinding_update(account, billing, role), - Check: testAccCheckGoogleBillingAccountIamBindingExists("foo", role, []string{ - fmt.Sprintf("serviceAccount:%s@%s.iam.gserviceaccount.com", account, getTestProjectFromEnv()), - fmt.Sprintf("serviceAccount:%s-2@%s.iam.gserviceaccount.com", account, getTestProjectFromEnv()), - }), - }, - { - ResourceName: "google_billing_account_iam_binding.foo", - ImportStateId: fmt.Sprintf("%s roles/billing.viewer", billing), - ImportState: true, - ImportStateVerify: true, - }, - { - // Test Iam Member creation (no update for member, no need to test) - Config: testAccBillingAccountIamMember_basic(account, billing, role), - Check: testAccCheckGoogleBillingAccountIamMemberExists("foo", "roles/billing.viewer", - fmt.Sprintf("serviceAccount:%s@%s.iam.gserviceaccount.com", account, getTestProjectFromEnv()), - ), - }, - { - ResourceName: "google_billing_account_iam_member.foo", - ImportStateId: fmt.Sprintf("%s roles/billing.viewer serviceAccount:%s@%s.iam.gserviceaccount.com", billing, account, getTestProjectFromEnv()), - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccCheckGoogleBillingAccountIamBindingExists(bindingResourceName, role string, members []string) resource.TestCheckFunc { - return func(s *terraform.State) error { - bindingRs, ok := s.RootModule().Resources["google_billing_account_iam_binding."+bindingResourceName] - if !ok { - return fmt.Errorf("Not found: %s", bindingResourceName) - } - - config := testAccProvider.Meta().(*Config) - p, err := config.clientBilling.BillingAccounts.GetIamPolicy("billingAccounts/" + bindingRs.Primary.Attributes["billing_account_id"]).Do() - if err != nil { - return err - } - - for _, binding := range p.Bindings { - if binding.Role == role { - sort.Strings(members) - sort.Strings(binding.Members) - - if reflect.DeepEqual(members, binding.Members) { - return nil - } - - return fmt.Errorf("Binding found but expected members is %v, got %v", members, binding.Members) - } - } - - return fmt.Errorf("No binding for role %q", role) - } -} - -func testAccCheckGoogleBillingAccountIamMemberExists(n, role, member string) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources["google_billing_account_iam_member."+n] - if !ok { - return fmt.Errorf("Not found: %s", n) - } - - config := testAccProvider.Meta().(*Config) - p, err := config.clientBilling.BillingAccounts.GetIamPolicy("billingAccounts/" + rs.Primary.Attributes["billing_account_id"]).Do() - if err != nil { - return err - } - - for _, binding := range p.Bindings { - if binding.Role == role { - for _, m := range binding.Members { - if m == member { - return nil - } - } - - return fmt.Errorf("Missing member %q, got %v", member, binding.Members) - } - } - - return fmt.Errorf("No binding for role %q", role) - } -} - -func testAccBillingAccountIamBinding_basic(account, billingAccountId, role string) string { - return fmt.Sprintf(` -resource "google_service_account" "test-account" { - account_id = "%s" - display_name = "Iam Testing Account" -} - -resource "google_billing_account_iam_binding" "foo" { - billing_account_id = "%s" - role = "%s" - members = ["serviceAccount:${google_service_account.test-account.email}"] -} -`, account, billingAccountId, role) -} - -func testAccBillingAccountIamBinding_update(account, billingAccountId, role string) string { - return fmt.Sprintf(` -resource "google_service_account" "test-account" { - account_id = "%s" - display_name = "Iam Testing Account" -} - -resource "google_service_account" "test-account-2" { - account_id = "%s-2" - display_name = "Iam Testing Account" -} - -resource "google_billing_account_iam_binding" "foo" { - billing_account_id = "%s" - role = "%s" - members = [ - "serviceAccount:${google_service_account.test-account.email}", - "serviceAccount:${google_service_account.test-account-2.email}" - ] -} -`, account, account, billingAccountId, role) -} - -func testAccBillingAccountIamMember_basic(account, billingAccountId, role string) string { - return fmt.Sprintf(` -resource "google_service_account" "test-account" { - account_id = "%s" - display_name = "Iam Testing Account" -} - -resource "google_billing_account_iam_member" "foo" { - billing_account_id = "%s" - role = "%s" - member = "serviceAccount:${google_service_account.test-account.email}" -} -`, account, billingAccountId, role) -} diff --git a/google/resource_google_project_iam_custom_role.go b/google/resource_google_project_iam_custom_role.go index 3c55600e..959cd4b7 100644 --- a/google/resource_google_project_iam_custom_role.go +++ b/google/resource_google_project_iam_custom_role.go @@ -2,7 +2,6 @@ package google import ( "fmt" - "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" "google.golang.org/api/iam/v1" @@ -52,10 +51,9 @@ func resourceGoogleProjectIamCustomRole() *schema.Resource { Optional: true, }, "deleted": { - Type: schema.TypeBool, - Optional: true, - Default: false, - Deprecated: `deleted will be converted to a computed-only field soon - if you want to delete this role, please use destroy`, + Type: schema.TypeBool, + Optional: true, + Default: false, }, }, } diff --git a/google/resource_google_project_services_test.go b/google/resource_google_project_services_test.go index d3057c53..80983106 100644 --- a/google/resource_google_project_services_test.go +++ b/google/resource_google_project_services_test.go @@ -19,9 +19,9 @@ func TestAccProjectServices_basic(t *testing.T) { org := getTestOrgFromEnv(t) pid := "terraform-" + acctest.RandString(10) - services1 := []string{"logging.googleapis.com", "cloudresourcemanager.googleapis.com"} + services1 := []string{"iam.googleapis.com", "cloudresourcemanager.googleapis.com"} services2 := []string{"cloudresourcemanager.googleapis.com"} - oobService := "logging.googleapis.com" + oobService := "iam.googleapis.com" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -70,7 +70,7 @@ func TestAccProjectServices_authoritative(t *testing.T) { org := getTestOrgFromEnv(t) pid := "terraform-" + acctest.RandString(10) services := []string{"cloudresourcemanager.googleapis.com"} - oobService := "logging.googleapis.com" + oobService := "iam.googleapis.com" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -106,8 +106,8 @@ func TestAccProjectServices_authoritative2(t *testing.T) { org := getTestOrgFromEnv(t) pid := "terraform-" + acctest.RandString(10) - oobServices := []string{"logging.googleapis.com", "cloudresourcemanager.googleapis.com"} - services := []string{"logging.googleapis.com"} + oobServices := []string{"iam.googleapis.com", "cloudresourcemanager.googleapis.com"} + services := []string{"iam.googleapis.com"} resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -217,7 +217,6 @@ func TestAccProjectServices_pagination(t *testing.T) { "firestore.googleapis.com", "genomics.googleapis.com", "iam.googleapis.com", - "iamcredentials.googleapis.com", "language.googleapis.com", "logging.googleapis.com", "ml.googleapis.com", diff --git a/google/resource_google_service_account.go b/google/resource_google_service_account.go index fe3752e7..146ffa08 100644 --- a/google/resource_google_service_account.go +++ b/google/resource_google_service_account.go @@ -17,7 +17,7 @@ func resourceGoogleServiceAccount() *schema.Resource { Delete: resourceGoogleServiceAccountDelete, Update: resourceGoogleServiceAccountUpdate, Importer: &schema.ResourceImporter{ - State: resourceGoogleServiceAccountImport, + State: schema.ImportStatePassthrough, }, Schema: map[string]*schema.Schema{ "email": &schema.Schema{ @@ -316,20 +316,3 @@ func saMergeBindings(bindings []*iam.Binding) []*iam.Binding { return rb } - -func resourceGoogleServiceAccountImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - config := meta.(*Config) - parseImportId([]string{ - "projects/(?P[^/]+)/serviceAccounts/(?P[^/]+)", - "(?P[^/]+)/(?P[^/]+)", - "(?P[^/]+)"}, d, config) - - // Replace import id for the resource id - id, err := replaceVars(d, config, "projects/{{project}}/serviceAccounts/{{email}}") - if err != nil { - return nil, fmt.Errorf("Error constructing id: %s", err) - } - d.SetId(id) - - return []*schema.ResourceData{d}, nil -} diff --git a/google/resource_google_service_account_test.go b/google/resource_google_service_account_test.go index b15f4793..6e2f5009 100644 --- a/google/resource_google_service_account_test.go +++ b/google/resource_google_service_account_test.go @@ -18,7 +18,6 @@ func TestAccServiceAccount_basic(t *testing.T) { displayName := "Terraform Test" displayName2 := "Terraform Test Update" project := getTestProjectFromEnv() - expectedEmail := fmt.Sprintf("%s@%s.iam.gserviceaccount.com", accountId, project) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -33,19 +32,6 @@ func TestAccServiceAccount_basic(t *testing.T) { }, resource.TestStep{ ResourceName: "google_service_account.acceptance", - ImportStateId: fmt.Sprintf("projects/%s/serviceAccounts/%s", project, expectedEmail), - ImportState: true, - ImportStateVerify: true, - }, - resource.TestStep{ - ResourceName: "google_service_account.acceptance", - ImportStateId: fmt.Sprintf("%s/%s", project, expectedEmail), - ImportState: true, - ImportStateVerify: true, - }, - resource.TestStep{ - ResourceName: "google_service_account.acceptance", - ImportStateId: expectedEmail, ImportState: true, ImportStateVerify: true, }, diff --git a/google/resource_kms_crypto_key_iam_test.go b/google/resource_kms_crypto_key_iam_test.go index 31336154..eb204512 100644 --- a/google/resource_kms_crypto_key_iam_test.go +++ b/google/resource_kms_crypto_key_iam_test.go @@ -187,7 +187,6 @@ resource "google_project_services" "test_project" { services = [ "cloudkms.googleapis.com", "iam.googleapis.com", - "iamcredentials.googleapis.com", ] } @@ -231,7 +230,6 @@ resource "google_project_services" "test_project" { services = [ "cloudkms.googleapis.com", "iam.googleapis.com", - "iamcredentials.googleapis.com", ] } @@ -284,7 +282,6 @@ resource "google_project_services" "test_project" { services = [ "cloudkms.googleapis.com", "iam.googleapis.com", - "iamcredentials.googleapis.com", ] } diff --git a/google/resource_kms_key_ring_iam_test.go b/google/resource_kms_key_ring_iam_test.go index 20f03daf..1ea0252d 100644 --- a/google/resource_kms_key_ring_iam_test.go +++ b/google/resource_kms_key_ring_iam_test.go @@ -179,7 +179,6 @@ resource "google_project_services" "test_project" { services = [ "cloudkms.googleapis.com", "iam.googleapis.com", - "iamcredentials.googleapis.com", ] } @@ -218,7 +217,6 @@ resource "google_project_services" "test_project" { services = [ "cloudkms.googleapis.com", "iam.googleapis.com", - "iamcredentials.googleapis.com", ] } @@ -266,7 +264,6 @@ resource "google_project_services" "test_project" { services = [ "cloudkms.googleapis.com", "iam.googleapis.com", - "iamcredentials.googleapis.com", ] } @@ -305,7 +302,6 @@ resource "google_project_services" "test_project" { services = [ "cloudkms.googleapis.com", "iam.googleapis.com", - "iamcredentials.googleapis.com", ] } diff --git a/google/resource_monitoring_group.go b/google/resource_monitoring_group.go deleted file mode 100644 index 8712b1cd..00000000 --- a/google/resource_monitoring_group.go +++ /dev/null @@ -1,295 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - -package google - -import ( - "fmt" - "log" - "reflect" - - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceMonitoringGroup() *schema.Resource { - return &schema.Resource{ - Create: resourceMonitoringGroupCreate, - Read: resourceMonitoringGroupRead, - Update: resourceMonitoringGroupUpdate, - Delete: resourceMonitoringGroupDelete, - - Importer: &schema.ResourceImporter{ - State: resourceMonitoringGroupImport, - }, - - Schema: map[string]*schema.Schema{ - "display_name": { - Type: schema.TypeString, - Required: true, - }, - "filter": { - Type: schema.TypeString, - Required: true, - }, - "is_cluster": { - Type: schema.TypeBool, - Optional: true, - }, - "parent_name": { - Type: schema.TypeString, - Optional: true, - DiffSuppressFunc: compareSelfLinkRelativePaths, - }, - "name": { - Type: schema.TypeString, - Computed: true, - }, - "project": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - }, - } -} - -func resourceMonitoringGroupCreate(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - obj := make(map[string]interface{}) - parentNameProp, err := expandMonitoringGroupParentName(d.Get("parent_name"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("parent_name"); !isEmptyValue(reflect.ValueOf(parentNameProp)) && (ok || !reflect.DeepEqual(v, parentNameProp)) { - obj["parentName"] = parentNameProp - } - isClusterProp, err := expandMonitoringGroupIsCluster(d.Get("is_cluster"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("is_cluster"); !isEmptyValue(reflect.ValueOf(isClusterProp)) && (ok || !reflect.DeepEqual(v, isClusterProp)) { - obj["isCluster"] = isClusterProp - } - displayNameProp, err := expandMonitoringGroupDisplayName(d.Get("display_name"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("display_name"); !isEmptyValue(reflect.ValueOf(displayNameProp)) && (ok || !reflect.DeepEqual(v, displayNameProp)) { - obj["displayName"] = displayNameProp - } - filterProp, err := expandMonitoringGroupFilter(d.Get("filter"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("filter"); !isEmptyValue(reflect.ValueOf(filterProp)) && (ok || !reflect.DeepEqual(v, filterProp)) { - obj["filter"] = filterProp - } - - lockName, err := replaceVars(d, config, "stackdriver/groups/{{project}}") - if err != nil { - return err - } - mutexKV.Lock(lockName) - defer mutexKV.Unlock(lockName) - - url, err := replaceVars(d, config, "https://monitoring.googleapis.com/v3/projects/{{project}}/groups") - if err != nil { - return err - } - - log.Printf("[DEBUG] Creating new Group: %#v", obj) - res, err := sendRequest(config, "POST", url, obj) - if err != nil { - return fmt.Errorf("Error creating Group: %s", err) - } - - // Store the ID now - id, err := replaceVars(d, config, "{{name}}") - if err != nil { - return fmt.Errorf("Error constructing id: %s", err) - } - d.SetId(id) - - log.Printf("[DEBUG] Finished creating Group %q: %#v", d.Id(), res) - - // `name` is autogenerated from the api so needs to be set post-create - name, ok := res["name"] - if !ok { - return fmt.Errorf("Create response didn't contain critical fields. Create may not have succeeded.") - } - d.Set("name", name.(string)) - d.SetId(name.(string)) - - return resourceMonitoringGroupRead(d, meta) -} - -func resourceMonitoringGroupRead(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - url, err := replaceVars(d, config, "https://monitoring.googleapis.com/v3/{{name}}") - if err != nil { - return err - } - - res, err := sendRequest(config, "GET", url, nil) - if err != nil { - return handleNotFoundError(err, d, fmt.Sprintf("MonitoringGroup %q", d.Id())) - } - - if err := d.Set("parent_name", flattenMonitoringGroupParentName(res["parentName"])); err != nil { - return fmt.Errorf("Error reading Group: %s", err) - } - if err := d.Set("name", flattenMonitoringGroupName(res["name"])); err != nil { - return fmt.Errorf("Error reading Group: %s", err) - } - if err := d.Set("is_cluster", flattenMonitoringGroupIsCluster(res["isCluster"])); err != nil { - return fmt.Errorf("Error reading Group: %s", err) - } - if err := d.Set("display_name", flattenMonitoringGroupDisplayName(res["displayName"])); err != nil { - return fmt.Errorf("Error reading Group: %s", err) - } - if err := d.Set("filter", flattenMonitoringGroupFilter(res["filter"])); err != nil { - return fmt.Errorf("Error reading Group: %s", err) - } - project, err := getProject(d, config) - if err != nil { - return err - } - if err := d.Set("project", project); err != nil { - return fmt.Errorf("Error reading Group: %s", err) - } - - return nil -} - -func resourceMonitoringGroupUpdate(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - obj := make(map[string]interface{}) - parentNameProp, err := expandMonitoringGroupParentName(d.Get("parent_name"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("parent_name"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, parentNameProp)) { - obj["parentName"] = parentNameProp - } - isClusterProp, err := expandMonitoringGroupIsCluster(d.Get("is_cluster"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("is_cluster"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, isClusterProp)) { - obj["isCluster"] = isClusterProp - } - displayNameProp, err := expandMonitoringGroupDisplayName(d.Get("display_name"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("display_name"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, displayNameProp)) { - obj["displayName"] = displayNameProp - } - filterProp, err := expandMonitoringGroupFilter(d.Get("filter"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("filter"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, filterProp)) { - obj["filter"] = filterProp - } - - lockName, err := replaceVars(d, config, "stackdriver/groups/{{project}}") - if err != nil { - return err - } - mutexKV.Lock(lockName) - defer mutexKV.Unlock(lockName) - - url, err := replaceVars(d, config, "https://monitoring.googleapis.com/v3/{{name}}") - if err != nil { - return err - } - - log.Printf("[DEBUG] Updating Group %q: %#v", d.Id(), obj) - _, err = sendRequest(config, "PUT", url, obj) - - if err != nil { - return fmt.Errorf("Error updating Group %q: %s", d.Id(), err) - } - - return resourceMonitoringGroupRead(d, meta) -} - -func resourceMonitoringGroupDelete(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - lockName, err := replaceVars(d, config, "stackdriver/groups/{{project}}") - if err != nil { - return err - } - mutexKV.Lock(lockName) - defer mutexKV.Unlock(lockName) - - url, err := replaceVars(d, config, "https://monitoring.googleapis.com/v3/{{name}}") - if err != nil { - return err - } - - var obj map[string]interface{} - log.Printf("[DEBUG] Deleting Group %q", d.Id()) - res, err := sendRequest(config, "DELETE", url, obj) - if err != nil { - return handleNotFoundError(err, d, "Group") - } - - log.Printf("[DEBUG] Finished deleting Group %q: %#v", d.Id(), res) - return nil -} - -func resourceMonitoringGroupImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - - config := meta.(*Config) - - // current import_formats can't import id's with forward slashes in them. - parseImportId([]string{"(?P.+)"}, d, config) - - return []*schema.ResourceData{d}, nil -} - -func flattenMonitoringGroupParentName(v interface{}) interface{} { - return v -} - -func flattenMonitoringGroupName(v interface{}) interface{} { - return v -} - -func flattenMonitoringGroupIsCluster(v interface{}) interface{} { - return v -} - -func flattenMonitoringGroupDisplayName(v interface{}) interface{} { - return v -} - -func flattenMonitoringGroupFilter(v interface{}) interface{} { - return v -} - -func expandMonitoringGroupParentName(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringGroupIsCluster(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringGroupDisplayName(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringGroupFilter(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} diff --git a/google/resource_monitoring_group_generated_test.go b/google/resource_monitoring_group_generated_test.go deleted file mode 100644 index 3a217987..00000000 --- a/google/resource_monitoring_group_generated_test.go +++ /dev/null @@ -1,113 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - -package google - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" -) - -func TestAccMonitoringGroup_monitoringGroupBasicExample(t *testing.T) { - t.Parallel() - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckMonitoringGroupDestroy, - Steps: []resource.TestStep{ - { - Config: testAccMonitoringGroup_monitoringGroupBasicExample(acctest.RandString(10)), - }, - { - ResourceName: "google_monitoring_group.basic", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccMonitoringGroup_monitoringGroupBasicExample(val string) string { - return fmt.Sprintf(` -resource "google_monitoring_group" "basic" { - display_name = "New Test Group-%s" - - filter = "resource.metadata.region=\"europe-west2\"" -} -`, val, - ) -} - -func TestAccMonitoringGroup_monitoringGroupSubgroupExample(t *testing.T) { - t.Parallel() - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckMonitoringGroupDestroy, - Steps: []resource.TestStep{ - { - Config: testAccMonitoringGroup_monitoringGroupSubgroupExample(acctest.RandString(10)), - }, - { - ResourceName: "google_monitoring_group.subgroup", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccMonitoringGroup_monitoringGroupSubgroupExample(val string) string { - return fmt.Sprintf(` -resource "google_monitoring_group" "parent" { - display_name = "New Test SubGroup-%s" - filter = "resource.metadata.region=\"europe-west2\"" -} - -resource "google_monitoring_group" "subgroup" { - display_name = "New Test SubGroup-%s" - filter = "resource.metadata.region=\"europe-west2\"" - parent_name = "${google_monitoring_group.parent.name}" -} -`, val, val, - ) -} - -func testAccCheckMonitoringGroupDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_monitoring_group" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://monitoring.googleapis.com/v3/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("MonitoringGroup still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_monitoring_group_test.go b/google/resource_monitoring_group_test.go deleted file mode 100644 index e5b70b0d..00000000 --- a/google/resource_monitoring_group_test.go +++ /dev/null @@ -1,47 +0,0 @@ -package google - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccMonitoringGroup_update(t *testing.T) { - t.Parallel() - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckMonitoringGroupDestroy, - Steps: []resource.TestStep{ - { - Config: testAccMonitoringGroup_update("europe-west1"), - }, - { - ResourceName: "google_monitoring_group.update", - ImportState: true, - ImportStateVerify: true, - }, - { - Config: testAccMonitoringGroup_update("europe-west2"), - }, - { - ResourceName: "google_monitoring_group.update", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccMonitoringGroup_update(zone string) string { - return fmt.Sprintf(` -resource "google_monitoring_group" "update" { - display_name = "Integration Test Group" - - filter = "resource.metadata.region=\"%s\"" -} -`, zone, - ) -} diff --git a/google/resource_monitoring_notification_channel.go b/google/resource_monitoring_notification_channel.go deleted file mode 100644 index e8e419d1..00000000 --- a/google/resource_monitoring_notification_channel.go +++ /dev/null @@ -1,376 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - -package google - -import ( - "fmt" - "log" - "reflect" - - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceMonitoringNotificationChannel() *schema.Resource { - return &schema.Resource{ - Create: resourceMonitoringNotificationChannelCreate, - Read: resourceMonitoringNotificationChannelRead, - Update: resourceMonitoringNotificationChannelUpdate, - Delete: resourceMonitoringNotificationChannelDelete, - - Importer: &schema.ResourceImporter{ - State: resourceMonitoringNotificationChannelImport, - }, - - Schema: map[string]*schema.Schema{ - "display_name": { - Type: schema.TypeString, - Required: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "enabled": { - Type: schema.TypeBool, - Optional: true, - Default: true, - }, - "labels": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "user_labels": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "name": { - Type: schema.TypeString, - Computed: true, - }, - "verification_status": { - Type: schema.TypeString, - Computed: true, - }, - "project": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - }, - } -} - -func resourceMonitoringNotificationChannelCreate(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - obj := make(map[string]interface{}) - labelsProp, err := expandMonitoringNotificationChannelLabels(d.Get("labels"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("labels"); !isEmptyValue(reflect.ValueOf(labelsProp)) && (ok || !reflect.DeepEqual(v, labelsProp)) { - obj["labels"] = labelsProp - } - typeProp, err := expandMonitoringNotificationChannelType(d.Get("type"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("type"); !isEmptyValue(reflect.ValueOf(typeProp)) && (ok || !reflect.DeepEqual(v, typeProp)) { - obj["type"] = typeProp - } - userLabelsProp, err := expandMonitoringNotificationChannelUserLabels(d.Get("user_labels"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("user_labels"); !isEmptyValue(reflect.ValueOf(userLabelsProp)) && (ok || !reflect.DeepEqual(v, userLabelsProp)) { - obj["userLabels"] = userLabelsProp - } - descriptionProp, err := expandMonitoringNotificationChannelDescription(d.Get("description"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("description"); !isEmptyValue(reflect.ValueOf(descriptionProp)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { - obj["description"] = descriptionProp - } - displayNameProp, err := expandMonitoringNotificationChannelDisplayName(d.Get("display_name"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("display_name"); !isEmptyValue(reflect.ValueOf(displayNameProp)) && (ok || !reflect.DeepEqual(v, displayNameProp)) { - obj["displayName"] = displayNameProp - } - enabledProp, err := expandMonitoringNotificationChannelEnabled(d.Get("enabled"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("enabled"); !isEmptyValue(reflect.ValueOf(enabledProp)) && (ok || !reflect.DeepEqual(v, enabledProp)) { - obj["enabled"] = enabledProp - } - - lockName, err := replaceVars(d, config, "stackdriver/notifications/{{project}}") - if err != nil { - return err - } - mutexKV.Lock(lockName) - defer mutexKV.Unlock(lockName) - - url, err := replaceVars(d, config, "https://monitoring.googleapis.com/v3/projects/{{project}}/notificationChannels") - if err != nil { - return err - } - - log.Printf("[DEBUG] Creating new NotificationChannel: %#v", obj) - res, err := sendRequest(config, "POST", url, obj) - if err != nil { - return fmt.Errorf("Error creating NotificationChannel: %s", err) - } - - // Store the ID now - id, err := replaceVars(d, config, "{{name}}") - if err != nil { - return fmt.Errorf("Error constructing id: %s", err) - } - d.SetId(id) - - log.Printf("[DEBUG] Finished creating NotificationChannel %q: %#v", d.Id(), res) - - // `name` is autogenerated from the api so needs to be set post-create - name, ok := res["name"] - if !ok { - return fmt.Errorf("Create response didn't contain critical fields. Create may not have succeeded.") - } - d.Set("name", name.(string)) - d.SetId(name.(string)) - - return resourceMonitoringNotificationChannelRead(d, meta) -} - -func resourceMonitoringNotificationChannelRead(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - url, err := replaceVars(d, config, "https://monitoring.googleapis.com/v3/{{name}}") - if err != nil { - return err - } - - res, err := sendRequest(config, "GET", url, nil) - if err != nil { - return handleNotFoundError(err, d, fmt.Sprintf("MonitoringNotificationChannel %q", d.Id())) - } - - if err := d.Set("labels", flattenMonitoringNotificationChannelLabels(res["labels"])); err != nil { - return fmt.Errorf("Error reading NotificationChannel: %s", err) - } - if err := d.Set("name", flattenMonitoringNotificationChannelName(res["name"])); err != nil { - return fmt.Errorf("Error reading NotificationChannel: %s", err) - } - if err := d.Set("verification_status", flattenMonitoringNotificationChannelVerificationStatus(res["verificationStatus"])); err != nil { - return fmt.Errorf("Error reading NotificationChannel: %s", err) - } - if err := d.Set("type", flattenMonitoringNotificationChannelType(res["type"])); err != nil { - return fmt.Errorf("Error reading NotificationChannel: %s", err) - } - if err := d.Set("user_labels", flattenMonitoringNotificationChannelUserLabels(res["userLabels"])); err != nil { - return fmt.Errorf("Error reading NotificationChannel: %s", err) - } - if err := d.Set("description", flattenMonitoringNotificationChannelDescription(res["description"])); err != nil { - return fmt.Errorf("Error reading NotificationChannel: %s", err) - } - if err := d.Set("display_name", flattenMonitoringNotificationChannelDisplayName(res["displayName"])); err != nil { - return fmt.Errorf("Error reading NotificationChannel: %s", err) - } - if err := d.Set("enabled", flattenMonitoringNotificationChannelEnabled(res["enabled"])); err != nil { - return fmt.Errorf("Error reading NotificationChannel: %s", err) - } - project, err := getProject(d, config) - if err != nil { - return err - } - if err := d.Set("project", project); err != nil { - return fmt.Errorf("Error reading NotificationChannel: %s", err) - } - - return nil -} - -func resourceMonitoringNotificationChannelUpdate(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - obj := make(map[string]interface{}) - labelsProp, err := expandMonitoringNotificationChannelLabels(d.Get("labels"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("labels"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, labelsProp)) { - obj["labels"] = labelsProp - } - typeProp, err := expandMonitoringNotificationChannelType(d.Get("type"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("type"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, typeProp)) { - obj["type"] = typeProp - } - userLabelsProp, err := expandMonitoringNotificationChannelUserLabels(d.Get("user_labels"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("user_labels"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, userLabelsProp)) { - obj["userLabels"] = userLabelsProp - } - descriptionProp, err := expandMonitoringNotificationChannelDescription(d.Get("description"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("description"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { - obj["description"] = descriptionProp - } - displayNameProp, err := expandMonitoringNotificationChannelDisplayName(d.Get("display_name"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("display_name"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, displayNameProp)) { - obj["displayName"] = displayNameProp - } - enabledProp, err := expandMonitoringNotificationChannelEnabled(d.Get("enabled"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("enabled"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, enabledProp)) { - obj["enabled"] = enabledProp - } - - lockName, err := replaceVars(d, config, "stackdriver/notifications/{{project}}") - if err != nil { - return err - } - mutexKV.Lock(lockName) - defer mutexKV.Unlock(lockName) - - url, err := replaceVars(d, config, "https://monitoring.googleapis.com/v3/{{name}}") - if err != nil { - return err - } - - log.Printf("[DEBUG] Updating NotificationChannel %q: %#v", d.Id(), obj) - _, err = sendRequest(config, "PATCH", url, obj) - - if err != nil { - return fmt.Errorf("Error updating NotificationChannel %q: %s", d.Id(), err) - } - - return resourceMonitoringNotificationChannelRead(d, meta) -} - -func resourceMonitoringNotificationChannelDelete(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - lockName, err := replaceVars(d, config, "stackdriver/notifications/{{project}}") - if err != nil { - return err - } - mutexKV.Lock(lockName) - defer mutexKV.Unlock(lockName) - - url, err := replaceVars(d, config, "https://monitoring.googleapis.com/v3/{{name}}") - if err != nil { - return err - } - - var obj map[string]interface{} - log.Printf("[DEBUG] Deleting NotificationChannel %q", d.Id()) - res, err := sendRequest(config, "DELETE", url, obj) - if err != nil { - return handleNotFoundError(err, d, "NotificationChannel") - } - - log.Printf("[DEBUG] Finished deleting NotificationChannel %q: %#v", d.Id(), res) - return nil -} - -func resourceMonitoringNotificationChannelImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - - config := meta.(*Config) - - // current import_formats can't import id's with forward slashes in them. - parseImportId([]string{"(?P.+)"}, d, config) - - return []*schema.ResourceData{d}, nil -} - -func flattenMonitoringNotificationChannelLabels(v interface{}) interface{} { - return v -} - -func flattenMonitoringNotificationChannelName(v interface{}) interface{} { - return v -} - -func flattenMonitoringNotificationChannelVerificationStatus(v interface{}) interface{} { - return v -} - -func flattenMonitoringNotificationChannelType(v interface{}) interface{} { - return v -} - -func flattenMonitoringNotificationChannelUserLabels(v interface{}) interface{} { - return v -} - -func flattenMonitoringNotificationChannelDescription(v interface{}) interface{} { - return v -} - -func flattenMonitoringNotificationChannelDisplayName(v interface{}) interface{} { - return v -} - -func flattenMonitoringNotificationChannelEnabled(v interface{}) interface{} { - return v -} - -func expandMonitoringNotificationChannelLabels(v interface{}, d *schema.ResourceData, config *Config) (map[string]string, error) { - if v == nil { - return map[string]string{}, nil - } - m := make(map[string]string) - for k, val := range v.(map[string]interface{}) { - m[k] = val.(string) - } - return m, nil -} - -func expandMonitoringNotificationChannelType(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringNotificationChannelUserLabels(v interface{}, d *schema.ResourceData, config *Config) (map[string]string, error) { - if v == nil { - return map[string]string{}, nil - } - m := make(map[string]string) - for k, val := range v.(map[string]interface{}) { - m[k] = val.(string) - } - return m, nil -} - -func expandMonitoringNotificationChannelDescription(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringNotificationChannelDisplayName(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringNotificationChannelEnabled(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} diff --git a/google/resource_monitoring_notification_channel_generated_test.go b/google/resource_monitoring_notification_channel_generated_test.go deleted file mode 100644 index f1907493..00000000 --- a/google/resource_monitoring_notification_channel_generated_test.go +++ /dev/null @@ -1,79 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - -package google - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" -) - -func TestAccMonitoringNotificationChannel_notificationChannelBasicExample(t *testing.T) { - t.Parallel() - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckMonitoringNotificationChannelDestroy, - Steps: []resource.TestStep{ - { - Config: testAccMonitoringNotificationChannel_notificationChannelBasicExample(acctest.RandString(10)), - }, - { - ResourceName: "google_monitoring_notification_channel.basic", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccMonitoringNotificationChannel_notificationChannelBasicExample(val string) string { - return fmt.Sprintf(` -resource "google_monitoring_notification_channel" "basic" { - display_name = "Test Notification Channel-%s" - type = "email" - labels = { - email_address = "fake_email@blahblah.com" - } -} -`, val, - ) -} - -func testAccCheckMonitoringNotificationChannelDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_monitoring_notification_channel" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://monitoring.googleapis.com/v3/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("MonitoringNotificationChannel still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_monitoring_notification_channel_test.go b/google/resource_monitoring_notification_channel_test.go deleted file mode 100644 index 3d26c8cb..00000000 --- a/google/resource_monitoring_notification_channel_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package google - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccMonitoringNotificationChannel_update(t *testing.T) { - t.Parallel() - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckMonitoringNotificationChannelDestroy, - Steps: []resource.TestStep{ - { - Config: testAccMonitoringNotificationChannel_update("email", `email_address = "fake_email@blahblah.com"`), - }, - { - ResourceName: "google_monitoring_notification_channel.update", - ImportState: true, - ImportStateVerify: true, - }, - { - Config: testAccMonitoringNotificationChannel_update("sms", `number = "+15555379009"`), - }, - { - ResourceName: "google_monitoring_notification_channel.update", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccMonitoringNotificationChannel_update(channel, labels string) string { - return fmt.Sprintf(` -resource "google_monitoring_notification_channel" "update" { - display_name = "IntTest Notification Channel" - type = "%s" - labels = { - %s - } -} -`, channel, labels, - ) -} diff --git a/google/resource_monitoring_uptime_check_config.go b/google/resource_monitoring_uptime_check_config.go deleted file mode 100644 index e533dd73..00000000 --- a/google/resource_monitoring_uptime_check_config.go +++ /dev/null @@ -1,1057 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - -package google - -import ( - "fmt" - "log" - "reflect" - "strconv" - - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceMonitoringUptimeCheckConfig() *schema.Resource { - return &schema.Resource{ - Create: resourceMonitoringUptimeCheckConfigCreate, - Read: resourceMonitoringUptimeCheckConfigRead, - Update: resourceMonitoringUptimeCheckConfigUpdate, - Delete: resourceMonitoringUptimeCheckConfigDelete, - - Importer: &schema.ResourceImporter{ - State: resourceMonitoringUptimeCheckConfigImport, - }, - - Schema: map[string]*schema.Schema{ - "display_name": { - Type: schema.TypeString, - Required: true, - }, - "timeout": { - Type: schema.TypeString, - Required: true, - }, - "content_matchers": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "content": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "http_check": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "auth_info": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "username": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "headers": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "mask_headers": { - Type: schema.TypeBool, - Optional: true, - }, - "path": { - Type: schema.TypeString, - Optional: true, - Default: "/", - }, - "port": { - Type: schema.TypeInt, - Optional: true, - Default: 80, - }, - "use_ssl": { - Type: schema.TypeBool, - Optional: true, - }, - }, - }, - ConflictsWith: []string{"tcp_check"}, - }, - "internal_checkers": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "display_name": { - Type: schema.TypeString, - Optional: true, - }, - "gcp_zone": { - Type: schema.TypeString, - Optional: true, - }, - "name": { - Type: schema.TypeString, - Optional: true, - }, - "network": { - Type: schema.TypeString, - Optional: true, - }, - "peer_project_id": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, - }, - "is_internal": { - Type: schema.TypeBool, - Optional: true, - }, - "monitored_resource": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "labels": { - Type: schema.TypeMap, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - ConflictsWith: []string{"resource_group"}, - }, - "period": { - Type: schema.TypeString, - Optional: true, - Default: "300s", - }, - "resource_group": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "group_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - DiffSuppressFunc: compareSelfLinkOrResourceName, - }, - "resource_type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{"RESOURCE_TYPE_UNSPECIFIED", "INSTANCE", "AWS_ELB_LOAD_BALANCER", ""}, false), - }, - }, - }, - ConflictsWith: []string{"monitored_resource"}, - }, - "selected_regions": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - "tcp_check": { - Type: schema.TypeList, - Optional: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "port": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - ConflictsWith: []string{"http_check"}, - }, - "name": { - Type: schema.TypeString, - Computed: true, - }, - "project": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - }, - } -} - -func resourceMonitoringUptimeCheckConfigCreate(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - obj := make(map[string]interface{}) - displayNameProp, err := expandMonitoringUptimeCheckConfigDisplayName(d.Get("display_name"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("display_name"); !isEmptyValue(reflect.ValueOf(displayNameProp)) && (ok || !reflect.DeepEqual(v, displayNameProp)) { - obj["displayName"] = displayNameProp - } - periodProp, err := expandMonitoringUptimeCheckConfigPeriod(d.Get("period"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("period"); !isEmptyValue(reflect.ValueOf(periodProp)) && (ok || !reflect.DeepEqual(v, periodProp)) { - obj["period"] = periodProp - } - timeoutProp, err := expandMonitoringUptimeCheckConfigTimeout(d.Get("timeout"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("timeout"); !isEmptyValue(reflect.ValueOf(timeoutProp)) && (ok || !reflect.DeepEqual(v, timeoutProp)) { - obj["timeout"] = timeoutProp - } - contentMatchersProp, err := expandMonitoringUptimeCheckConfigContentMatchers(d.Get("content_matchers"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("content_matchers"); !isEmptyValue(reflect.ValueOf(contentMatchersProp)) && (ok || !reflect.DeepEqual(v, contentMatchersProp)) { - obj["contentMatchers"] = contentMatchersProp - } - selectedRegionsProp, err := expandMonitoringUptimeCheckConfigSelectedRegions(d.Get("selected_regions"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("selected_regions"); !isEmptyValue(reflect.ValueOf(selectedRegionsProp)) && (ok || !reflect.DeepEqual(v, selectedRegionsProp)) { - obj["selectedRegions"] = selectedRegionsProp - } - isInternalProp, err := expandMonitoringUptimeCheckConfigIsInternal(d.Get("is_internal"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("is_internal"); !isEmptyValue(reflect.ValueOf(isInternalProp)) && (ok || !reflect.DeepEqual(v, isInternalProp)) { - obj["isInternal"] = isInternalProp - } - internalCheckersProp, err := expandMonitoringUptimeCheckConfigInternalCheckers(d.Get("internal_checkers"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("internal_checkers"); !isEmptyValue(reflect.ValueOf(internalCheckersProp)) && (ok || !reflect.DeepEqual(v, internalCheckersProp)) { - obj["internalCheckers"] = internalCheckersProp - } - httpCheckProp, err := expandMonitoringUptimeCheckConfigHttpCheck(d.Get("http_check"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("http_check"); !isEmptyValue(reflect.ValueOf(httpCheckProp)) && (ok || !reflect.DeepEqual(v, httpCheckProp)) { - obj["httpCheck"] = httpCheckProp - } - tcpCheckProp, err := expandMonitoringUptimeCheckConfigTcpCheck(d.Get("tcp_check"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("tcp_check"); !isEmptyValue(reflect.ValueOf(tcpCheckProp)) && (ok || !reflect.DeepEqual(v, tcpCheckProp)) { - obj["tcpCheck"] = tcpCheckProp - } - resourceGroupProp, err := expandMonitoringUptimeCheckConfigResourceGroup(d.Get("resource_group"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("resource_group"); !isEmptyValue(reflect.ValueOf(resourceGroupProp)) && (ok || !reflect.DeepEqual(v, resourceGroupProp)) { - obj["resourceGroup"] = resourceGroupProp - } - monitoredResourceProp, err := expandMonitoringUptimeCheckConfigMonitoredResource(d.Get("monitored_resource"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("monitored_resource"); !isEmptyValue(reflect.ValueOf(monitoredResourceProp)) && (ok || !reflect.DeepEqual(v, monitoredResourceProp)) { - obj["monitoredResource"] = monitoredResourceProp - } - - url, err := replaceVars(d, config, "https://monitoring.googleapis.com/v3/projects/{{project}}/uptimeCheckConfigs") - if err != nil { - return err - } - - log.Printf("[DEBUG] Creating new UptimeCheckConfig: %#v", obj) - res, err := sendRequest(config, "POST", url, obj) - if err != nil { - return fmt.Errorf("Error creating UptimeCheckConfig: %s", err) - } - - // Store the ID now - id, err := replaceVars(d, config, "{{name}}") - if err != nil { - return fmt.Errorf("Error constructing id: %s", err) - } - d.SetId(id) - - log.Printf("[DEBUG] Finished creating UptimeCheckConfig %q: %#v", d.Id(), res) - - // `name` is autogenerated from the api so needs to be set post-create - name, ok := res["name"] - if !ok { - return fmt.Errorf("Create response didn't contain critical fields. Create may not have succeeded.") - } - d.Set("name", name.(string)) - d.SetId(name.(string)) - - return resourceMonitoringUptimeCheckConfigRead(d, meta) -} - -func resourceMonitoringUptimeCheckConfigRead(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - url, err := replaceVars(d, config, "https://monitoring.googleapis.com/v3/{{name}}") - if err != nil { - return err - } - - res, err := sendRequest(config, "GET", url, nil) - if err != nil { - return handleNotFoundError(err, d, fmt.Sprintf("MonitoringUptimeCheckConfig %q", d.Id())) - } - - project, err := getProject(d, config) - if err != nil { - return err - } - if err := d.Set("project", project); err != nil { - return fmt.Errorf("Error reading UptimeCheckConfig: %s", err) - } - - if err := d.Set("name", flattenMonitoringUptimeCheckConfigName(res["name"], d)); err != nil { - return fmt.Errorf("Error reading UptimeCheckConfig: %s", err) - } - if err := d.Set("display_name", flattenMonitoringUptimeCheckConfigDisplayName(res["displayName"], d)); err != nil { - return fmt.Errorf("Error reading UptimeCheckConfig: %s", err) - } - if err := d.Set("period", flattenMonitoringUptimeCheckConfigPeriod(res["period"], d)); err != nil { - return fmt.Errorf("Error reading UptimeCheckConfig: %s", err) - } - if err := d.Set("timeout", flattenMonitoringUptimeCheckConfigTimeout(res["timeout"], d)); err != nil { - return fmt.Errorf("Error reading UptimeCheckConfig: %s", err) - } - if err := d.Set("content_matchers", flattenMonitoringUptimeCheckConfigContentMatchers(res["contentMatchers"], d)); err != nil { - return fmt.Errorf("Error reading UptimeCheckConfig: %s", err) - } - if err := d.Set("selected_regions", flattenMonitoringUptimeCheckConfigSelectedRegions(res["selectedRegions"], d)); err != nil { - return fmt.Errorf("Error reading UptimeCheckConfig: %s", err) - } - if err := d.Set("is_internal", flattenMonitoringUptimeCheckConfigIsInternal(res["isInternal"], d)); err != nil { - return fmt.Errorf("Error reading UptimeCheckConfig: %s", err) - } - if err := d.Set("internal_checkers", flattenMonitoringUptimeCheckConfigInternalCheckers(res["internalCheckers"], d)); err != nil { - return fmt.Errorf("Error reading UptimeCheckConfig: %s", err) - } - if err := d.Set("http_check", flattenMonitoringUptimeCheckConfigHttpCheck(res["httpCheck"], d)); err != nil { - return fmt.Errorf("Error reading UptimeCheckConfig: %s", err) - } - if err := d.Set("tcp_check", flattenMonitoringUptimeCheckConfigTcpCheck(res["tcpCheck"], d)); err != nil { - return fmt.Errorf("Error reading UptimeCheckConfig: %s", err) - } - if err := d.Set("resource_group", flattenMonitoringUptimeCheckConfigResourceGroup(res["resourceGroup"], d)); err != nil { - return fmt.Errorf("Error reading UptimeCheckConfig: %s", err) - } - if err := d.Set("monitored_resource", flattenMonitoringUptimeCheckConfigMonitoredResource(res["monitoredResource"], d)); err != nil { - return fmt.Errorf("Error reading UptimeCheckConfig: %s", err) - } - - return nil -} - -func resourceMonitoringUptimeCheckConfigUpdate(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - obj := make(map[string]interface{}) - displayNameProp, err := expandMonitoringUptimeCheckConfigDisplayName(d.Get("display_name"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("display_name"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, displayNameProp)) { - obj["displayName"] = displayNameProp - } - periodProp, err := expandMonitoringUptimeCheckConfigPeriod(d.Get("period"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("period"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, periodProp)) { - obj["period"] = periodProp - } - timeoutProp, err := expandMonitoringUptimeCheckConfigTimeout(d.Get("timeout"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("timeout"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, timeoutProp)) { - obj["timeout"] = timeoutProp - } - contentMatchersProp, err := expandMonitoringUptimeCheckConfigContentMatchers(d.Get("content_matchers"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("content_matchers"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, contentMatchersProp)) { - obj["contentMatchers"] = contentMatchersProp - } - selectedRegionsProp, err := expandMonitoringUptimeCheckConfigSelectedRegions(d.Get("selected_regions"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("selected_regions"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, selectedRegionsProp)) { - obj["selectedRegions"] = selectedRegionsProp - } - isInternalProp, err := expandMonitoringUptimeCheckConfigIsInternal(d.Get("is_internal"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("is_internal"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, isInternalProp)) { - obj["isInternal"] = isInternalProp - } - internalCheckersProp, err := expandMonitoringUptimeCheckConfigInternalCheckers(d.Get("internal_checkers"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("internal_checkers"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, internalCheckersProp)) { - obj["internalCheckers"] = internalCheckersProp - } - httpCheckProp, err := expandMonitoringUptimeCheckConfigHttpCheck(d.Get("http_check"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("http_check"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, httpCheckProp)) { - obj["httpCheck"] = httpCheckProp - } - tcpCheckProp, err := expandMonitoringUptimeCheckConfigTcpCheck(d.Get("tcp_check"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("tcp_check"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, tcpCheckProp)) { - obj["tcpCheck"] = tcpCheckProp - } - resourceGroupProp, err := expandMonitoringUptimeCheckConfigResourceGroup(d.Get("resource_group"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("resource_group"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, resourceGroupProp)) { - obj["resourceGroup"] = resourceGroupProp - } - monitoredResourceProp, err := expandMonitoringUptimeCheckConfigMonitoredResource(d.Get("monitored_resource"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("monitored_resource"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, monitoredResourceProp)) { - obj["monitoredResource"] = monitoredResourceProp - } - - url, err := replaceVars(d, config, "https://monitoring.googleapis.com/v3/{{name}}") - if err != nil { - return err - } - - log.Printf("[DEBUG] Updating UptimeCheckConfig %q: %#v", d.Id(), obj) - _, err = sendRequest(config, "PATCH", url, obj) - - if err != nil { - return fmt.Errorf("Error updating UptimeCheckConfig %q: %s", d.Id(), err) - } - - return resourceMonitoringUptimeCheckConfigRead(d, meta) -} - -func resourceMonitoringUptimeCheckConfigDelete(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - url, err := replaceVars(d, config, "https://monitoring.googleapis.com/v3/{{name}}") - if err != nil { - return err - } - - var obj map[string]interface{} - log.Printf("[DEBUG] Deleting UptimeCheckConfig %q", d.Id()) - res, err := sendRequest(config, "DELETE", url, obj) - if err != nil { - return handleNotFoundError(err, d, "UptimeCheckConfig") - } - - log.Printf("[DEBUG] Finished deleting UptimeCheckConfig %q: %#v", d.Id(), res) - return nil -} - -func resourceMonitoringUptimeCheckConfigImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - - config := meta.(*Config) - - // current import_formats can't import id's with forward slashes in them. - parseImportId([]string{"(?P.+)"}, d, config) - - return []*schema.ResourceData{d}, nil -} - -func flattenMonitoringUptimeCheckConfigName(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigDisplayName(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigPeriod(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigTimeout(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigContentMatchers(v interface{}, d *schema.ResourceData) interface{} { - if v == nil { - return v - } - l := v.([]interface{}) - transformed := make([]interface{}, 0, len(l)) - for _, raw := range l { - original := raw.(map[string]interface{}) - if len(original) < 1 { - // Do not include empty json objects coming back from the api - continue - } - transformed = append(transformed, map[string]interface{}{ - "content": flattenMonitoringUptimeCheckConfigContentMatchersContent(original["content"], d), - }) - } - return transformed -} -func flattenMonitoringUptimeCheckConfigContentMatchersContent(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigSelectedRegions(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigIsInternal(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigInternalCheckers(v interface{}, d *schema.ResourceData) interface{} { - if v == nil { - return v - } - l := v.([]interface{}) - transformed := make([]interface{}, 0, len(l)) - for _, raw := range l { - original := raw.(map[string]interface{}) - if len(original) < 1 { - // Do not include empty json objects coming back from the api - continue - } - transformed = append(transformed, map[string]interface{}{ - "gcp_zone": flattenMonitoringUptimeCheckConfigInternalCheckersGcpZone(original["gcpZone"], d), - "peer_project_id": flattenMonitoringUptimeCheckConfigInternalCheckersPeerProjectId(original["peerProjectId"], d), - "name": flattenMonitoringUptimeCheckConfigInternalCheckersName(original["name"], d), - "network": flattenMonitoringUptimeCheckConfigInternalCheckersNetwork(original["network"], d), - "display_name": flattenMonitoringUptimeCheckConfigInternalCheckersDisplayName(original["displayName"], d), - }) - } - return transformed -} -func flattenMonitoringUptimeCheckConfigInternalCheckersGcpZone(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigInternalCheckersPeerProjectId(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigInternalCheckersName(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigInternalCheckersNetwork(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigInternalCheckersDisplayName(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigHttpCheck(v interface{}, d *schema.ResourceData) interface{} { - if v == nil { - return nil - } - original := v.(map[string]interface{}) - if len(original) == 0 { - return nil - } - transformed := make(map[string]interface{}) - transformed["auth_info"] = - flattenMonitoringUptimeCheckConfigHttpCheckAuthInfo(original["authInfo"], d) - transformed["port"] = - flattenMonitoringUptimeCheckConfigHttpCheckPort(original["port"], d) - transformed["headers"] = - flattenMonitoringUptimeCheckConfigHttpCheckHeaders(original["headers"], d) - transformed["path"] = - flattenMonitoringUptimeCheckConfigHttpCheckPath(original["path"], d) - transformed["use_ssl"] = - flattenMonitoringUptimeCheckConfigHttpCheckUseSsl(original["useSsl"], d) - transformed["mask_headers"] = - flattenMonitoringUptimeCheckConfigHttpCheckMaskHeaders(original["maskHeaders"], d) - return []interface{}{transformed} -} -func flattenMonitoringUptimeCheckConfigHttpCheckAuthInfo(v interface{}, d *schema.ResourceData) interface{} { - if v == nil { - return nil - } - original := v.(map[string]interface{}) - if len(original) == 0 { - return nil - } - transformed := make(map[string]interface{}) - transformed["password"] = - flattenMonitoringUptimeCheckConfigHttpCheckAuthInfoPassword(original["password"], d) - transformed["username"] = - flattenMonitoringUptimeCheckConfigHttpCheckAuthInfoUsername(original["username"], d) - return []interface{}{transformed} -} -func flattenMonitoringUptimeCheckConfigHttpCheckAuthInfoPassword(v interface{}, d *schema.ResourceData) interface{} { - return d.Get("http_check.0.auth_info.0.password") -} - -func flattenMonitoringUptimeCheckConfigHttpCheckAuthInfoUsername(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigHttpCheckPort(v interface{}, d *schema.ResourceData) interface{} { - // Handles the string fixed64 format - if strVal, ok := v.(string); ok { - if intVal, err := strconv.ParseInt(strVal, 10, 64); err == nil { - return intVal - } // let terraform core handle it if we can't convert the string to an int. - } - return v -} - -func flattenMonitoringUptimeCheckConfigHttpCheckHeaders(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigHttpCheckPath(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigHttpCheckUseSsl(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigHttpCheckMaskHeaders(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigTcpCheck(v interface{}, d *schema.ResourceData) interface{} { - if v == nil { - return nil - } - original := v.(map[string]interface{}) - if len(original) == 0 { - return nil - } - transformed := make(map[string]interface{}) - transformed["port"] = - flattenMonitoringUptimeCheckConfigTcpCheckPort(original["port"], d) - return []interface{}{transformed} -} -func flattenMonitoringUptimeCheckConfigTcpCheckPort(v interface{}, d *schema.ResourceData) interface{} { - // Handles the string fixed64 format - if strVal, ok := v.(string); ok { - if intVal, err := strconv.ParseInt(strVal, 10, 64); err == nil { - return intVal - } // let terraform core handle it if we can't convert the string to an int. - } - return v -} - -func flattenMonitoringUptimeCheckConfigResourceGroup(v interface{}, d *schema.ResourceData) interface{} { - if v == nil { - return nil - } - original := v.(map[string]interface{}) - if len(original) == 0 { - return nil - } - transformed := make(map[string]interface{}) - transformed["resource_type"] = - flattenMonitoringUptimeCheckConfigResourceGroupResourceType(original["resourceType"], d) - transformed["group_id"] = - flattenMonitoringUptimeCheckConfigResourceGroupGroupId(original["groupId"], d) - return []interface{}{transformed} -} -func flattenMonitoringUptimeCheckConfigResourceGroupResourceType(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigResourceGroupGroupId(v interface{}, d *schema.ResourceData) interface{} { - project := d.Get("project").(string) - return fmt.Sprintf("projects/%s/groups/%s", project, v) -} - -func flattenMonitoringUptimeCheckConfigMonitoredResource(v interface{}, d *schema.ResourceData) interface{} { - if v == nil { - return nil - } - original := v.(map[string]interface{}) - if len(original) == 0 { - return nil - } - transformed := make(map[string]interface{}) - transformed["type"] = - flattenMonitoringUptimeCheckConfigMonitoredResourceType(original["type"], d) - transformed["labels"] = - flattenMonitoringUptimeCheckConfigMonitoredResourceLabels(original["labels"], d) - return []interface{}{transformed} -} -func flattenMonitoringUptimeCheckConfigMonitoredResourceType(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func flattenMonitoringUptimeCheckConfigMonitoredResourceLabels(v interface{}, d *schema.ResourceData) interface{} { - return v -} - -func expandMonitoringUptimeCheckConfigDisplayName(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigPeriod(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigTimeout(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigContentMatchers(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - l := v.([]interface{}) - req := make([]interface{}, 0, len(l)) - for _, raw := range l { - if raw == nil { - continue - } - original := raw.(map[string]interface{}) - transformed := make(map[string]interface{}) - - transformedContent, err := expandMonitoringUptimeCheckConfigContentMatchersContent(original["content"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedContent); val.IsValid() && !isEmptyValue(val) { - transformed["content"] = transformedContent - } - - req = append(req, transformed) - } - return req, nil -} - -func expandMonitoringUptimeCheckConfigContentMatchersContent(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigSelectedRegions(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigIsInternal(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigInternalCheckers(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - l := v.([]interface{}) - req := make([]interface{}, 0, len(l)) - for _, raw := range l { - if raw == nil { - continue - } - original := raw.(map[string]interface{}) - transformed := make(map[string]interface{}) - - transformedGcpZone, err := expandMonitoringUptimeCheckConfigInternalCheckersGcpZone(original["gcp_zone"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedGcpZone); val.IsValid() && !isEmptyValue(val) { - transformed["gcpZone"] = transformedGcpZone - } - - transformedPeerProjectId, err := expandMonitoringUptimeCheckConfigInternalCheckersPeerProjectId(original["peer_project_id"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedPeerProjectId); val.IsValid() && !isEmptyValue(val) { - transformed["peerProjectId"] = transformedPeerProjectId - } - - transformedName, err := expandMonitoringUptimeCheckConfigInternalCheckersName(original["name"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedName); val.IsValid() && !isEmptyValue(val) { - transformed["name"] = transformedName - } - - transformedNetwork, err := expandMonitoringUptimeCheckConfigInternalCheckersNetwork(original["network"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedNetwork); val.IsValid() && !isEmptyValue(val) { - transformed["network"] = transformedNetwork - } - - transformedDisplayName, err := expandMonitoringUptimeCheckConfigInternalCheckersDisplayName(original["display_name"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedDisplayName); val.IsValid() && !isEmptyValue(val) { - transformed["displayName"] = transformedDisplayName - } - - req = append(req, transformed) - } - return req, nil -} - -func expandMonitoringUptimeCheckConfigInternalCheckersGcpZone(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigInternalCheckersPeerProjectId(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigInternalCheckersName(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigInternalCheckersNetwork(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigInternalCheckersDisplayName(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigHttpCheck(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - l := v.([]interface{}) - if len(l) == 0 || l[0] == nil { - return nil, nil - } - raw := l[0] - original := raw.(map[string]interface{}) - transformed := make(map[string]interface{}) - - transformedAuthInfo, err := expandMonitoringUptimeCheckConfigHttpCheckAuthInfo(original["auth_info"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedAuthInfo); val.IsValid() && !isEmptyValue(val) { - transformed["authInfo"] = transformedAuthInfo - } - - transformedPort, err := expandMonitoringUptimeCheckConfigHttpCheckPort(original["port"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedPort); val.IsValid() && !isEmptyValue(val) { - transformed["port"] = transformedPort - } - - transformedHeaders, err := expandMonitoringUptimeCheckConfigHttpCheckHeaders(original["headers"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedHeaders); val.IsValid() && !isEmptyValue(val) { - transformed["headers"] = transformedHeaders - } - - transformedPath, err := expandMonitoringUptimeCheckConfigHttpCheckPath(original["path"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedPath); val.IsValid() && !isEmptyValue(val) { - transformed["path"] = transformedPath - } - - transformedUseSsl, err := expandMonitoringUptimeCheckConfigHttpCheckUseSsl(original["use_ssl"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedUseSsl); val.IsValid() && !isEmptyValue(val) { - transformed["useSsl"] = transformedUseSsl - } - - transformedMaskHeaders, err := expandMonitoringUptimeCheckConfigHttpCheckMaskHeaders(original["mask_headers"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedMaskHeaders); val.IsValid() && !isEmptyValue(val) { - transformed["maskHeaders"] = transformedMaskHeaders - } - - return transformed, nil -} - -func expandMonitoringUptimeCheckConfigHttpCheckAuthInfo(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - l := v.([]interface{}) - if len(l) == 0 || l[0] == nil { - return nil, nil - } - raw := l[0] - original := raw.(map[string]interface{}) - transformed := make(map[string]interface{}) - - transformedPassword, err := expandMonitoringUptimeCheckConfigHttpCheckAuthInfoPassword(original["password"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedPassword); val.IsValid() && !isEmptyValue(val) { - transformed["password"] = transformedPassword - } - - transformedUsername, err := expandMonitoringUptimeCheckConfigHttpCheckAuthInfoUsername(original["username"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedUsername); val.IsValid() && !isEmptyValue(val) { - transformed["username"] = transformedUsername - } - - return transformed, nil -} - -func expandMonitoringUptimeCheckConfigHttpCheckAuthInfoPassword(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigHttpCheckAuthInfoUsername(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigHttpCheckPort(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigHttpCheckHeaders(v interface{}, d *schema.ResourceData, config *Config) (map[string]string, error) { - if v == nil { - return map[string]string{}, nil - } - m := make(map[string]string) - for k, val := range v.(map[string]interface{}) { - m[k] = val.(string) - } - return m, nil -} - -func expandMonitoringUptimeCheckConfigHttpCheckPath(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigHttpCheckUseSsl(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigHttpCheckMaskHeaders(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigTcpCheck(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - l := v.([]interface{}) - if len(l) == 0 || l[0] == nil { - return nil, nil - } - raw := l[0] - original := raw.(map[string]interface{}) - transformed := make(map[string]interface{}) - - transformedPort, err := expandMonitoringUptimeCheckConfigTcpCheckPort(original["port"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedPort); val.IsValid() && !isEmptyValue(val) { - transformed["port"] = transformedPort - } - - return transformed, nil -} - -func expandMonitoringUptimeCheckConfigTcpCheckPort(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigResourceGroup(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - l := v.([]interface{}) - if len(l) == 0 || l[0] == nil { - return nil, nil - } - raw := l[0] - original := raw.(map[string]interface{}) - transformed := make(map[string]interface{}) - - transformedResourceType, err := expandMonitoringUptimeCheckConfigResourceGroupResourceType(original["resource_type"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedResourceType); val.IsValid() && !isEmptyValue(val) { - transformed["resourceType"] = transformedResourceType - } - - transformedGroupId, err := expandMonitoringUptimeCheckConfigResourceGroupGroupId(original["group_id"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedGroupId); val.IsValid() && !isEmptyValue(val) { - transformed["groupId"] = transformedGroupId - } - - return transformed, nil -} - -func expandMonitoringUptimeCheckConfigResourceGroupResourceType(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigResourceGroupGroupId(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return GetResourceNameFromSelfLink(v.(string)), nil -} - -func expandMonitoringUptimeCheckConfigMonitoredResource(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - l := v.([]interface{}) - if len(l) == 0 || l[0] == nil { - return nil, nil - } - raw := l[0] - original := raw.(map[string]interface{}) - transformed := make(map[string]interface{}) - - transformedType, err := expandMonitoringUptimeCheckConfigMonitoredResourceType(original["type"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedType); val.IsValid() && !isEmptyValue(val) { - transformed["type"] = transformedType - } - - transformedLabels, err := expandMonitoringUptimeCheckConfigMonitoredResourceLabels(original["labels"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedLabels); val.IsValid() && !isEmptyValue(val) { - transformed["labels"] = transformedLabels - } - - return transformed, nil -} - -func expandMonitoringUptimeCheckConfigMonitoredResourceType(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandMonitoringUptimeCheckConfigMonitoredResourceLabels(v interface{}, d *schema.ResourceData, config *Config) (map[string]string, error) { - if v == nil { - return map[string]string{}, nil - } - m := make(map[string]string) - for k, val := range v.(map[string]interface{}) { - m[k] = val.(string) - } - return m, nil -} diff --git a/google/resource_monitoring_uptime_check_config_generated_test.go b/google/resource_monitoring_uptime_check_config_generated_test.go deleted file mode 100644 index 1a991b9a..00000000 --- a/google/resource_monitoring_uptime_check_config_generated_test.go +++ /dev/null @@ -1,138 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - -package google - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" -) - -func TestAccMonitoringUptimeCheckConfig_uptimeCheckConfigHttpExample(t *testing.T) { - t.Parallel() - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckMonitoringUptimeCheckConfigDestroy, - Steps: []resource.TestStep{ - { - Config: testAccMonitoringUptimeCheckConfig_uptimeCheckConfigHttpExample(acctest.RandString(10)), - }, - { - ResourceName: "google_monitoring_uptime_check_config.http", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccMonitoringUptimeCheckConfig_uptimeCheckConfigHttpExample(val string) string { - return fmt.Sprintf(` -resource "google_monitoring_uptime_check_config" "http" { - display_name = "http-uptime-check-%s" - timeout = "60s" - - http_check = { - path = "/some-path" - port = "8010" - } - - monitored_resource { - type = "uptime_url" - labels = { - project_id = "example" - host = "192.168.1.1" - } - } - - content_matchers = { - content = "example" - } -} -`, val, - ) -} - -func TestAccMonitoringUptimeCheckConfig_uptimeCheckTcpExample(t *testing.T) { - t.Parallel() - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckMonitoringUptimeCheckConfigDestroy, - Steps: []resource.TestStep{ - { - Config: testAccMonitoringUptimeCheckConfig_uptimeCheckTcpExample(acctest.RandString(10)), - }, - { - ResourceName: "google_monitoring_uptime_check_config.tcp_group", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccMonitoringUptimeCheckConfig_uptimeCheckTcpExample(val string) string { - return fmt.Sprintf(` -resource "google_monitoring_uptime_check_config" "tcp_group" { - display_name = "tcp-uptime-check-%s" - timeout = "60s" - - tcp_check = { - port = 888 - } - - resource_group { - resource_type = "INSTANCE" - group_id = "${google_monitoring_group.check.name}" - } -} - - -resource "google_monitoring_group" "check" { - display_name = "uptime-check-group-%s" - filter = "resource.metadata.name=has_substring(\"foo\")" -} -`, val, val, - ) -} - -func testAccCheckMonitoringUptimeCheckConfigDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_monitoring_uptime_check_config" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://monitoring.googleapis.com/v3/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("MonitoringUptimeCheckConfig still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_monitoring_uptime_check_config_test.go b/google/resource_monitoring_uptime_check_config_test.go deleted file mode 100644 index c58171c5..00000000 --- a/google/resource_monitoring_uptime_check_config_test.go +++ /dev/null @@ -1,71 +0,0 @@ -package google - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccMonitoringUptimeCheckConfig_update(t *testing.T) { - t.Parallel() - project := getTestProjectFromEnv() - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckMonitoringUptimeCheckConfigDestroy, - Steps: []resource.TestStep{ - { - Config: testAccMonitoringUptimeCheckConfig_update("mypath", "password1", project), - }, - { - ResourceName: "google_monitoring_uptime_check_config.http", - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"http_check.0.auth_info.0.password"}, - }, - { - Config: testAccMonitoringUptimeCheckConfig_update("", "password2", project), - }, - { - ResourceName: "google_monitoring_uptime_check_config.http", - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"http_check.0.auth_info.0.password"}, - }, - }, - }) -} - -func testAccMonitoringUptimeCheckConfig_update(path, project, pwd string) string { - return fmt.Sprintf(` -resource "google_monitoring_uptime_check_config" "http" { - display_name = "http-uptime-check-%s" - timeout = "60s" - - http_check = { - path = "/%s" - port = "8010" - auth_info = { - username = "name" - password = "%s" - } - } - - monitored_resource { - type = "uptime_url" - labels = { - project_id = "%s" - host = "192.168.1.1" - } - } - - content_matchers = { - content = "example" - } -} -`, acctest.RandString(4), path, project, pwd, - ) -} diff --git a/google/resource_pubsub_topic.go b/google/resource_pubsub_topic.go index 8d44a3b0..dc625595 100644 --- a/google/resource_pubsub_topic.go +++ b/google/resource_pubsub_topic.go @@ -55,7 +55,7 @@ func resourcePubsubTopicCreate(d *schema.ResourceData, meta interface{}) error { d.SetId(res.Name) - return resourcePubsubTopicRead(d, meta) + return nil } func resourcePubsubTopicRead(d *schema.ResourceData, meta interface{}) error { diff --git a/google/resource_redis_instance.go b/google/resource_redis_instance.go index 6feef9b0..a62ebd43 100644 --- a/google/resource_redis_instance.go +++ b/google/resource_redis_instance.go @@ -40,8 +40,8 @@ func resourceRedisInstance() *schema.Resource { Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(360 * time.Second), - Update: schema.DefaultTimeout(360 * time.Second), - Delete: schema.DefaultTimeout(360 * time.Second), + Update: schema.DefaultTimeout(240 * time.Second), + Delete: schema.DefaultTimeout(240 * time.Second), }, Schema: map[string]*schema.Schema{ diff --git a/google/resource_redis_instance_generated_test.go b/google/resource_redis_instance_generated_test.go index 3ea2ab79..1d08da4e 100644 --- a/google/resource_redis_instance_generated_test.go +++ b/google/resource_redis_instance_generated_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" ) func TestAccRedisInstance_redisInstanceBasicExample(t *testing.T) { @@ -103,25 +102,3 @@ resource "google_compute_network" "auto-network" { `, val, val, ) } - -func testAccCheckRedisInstanceDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_redis_instance" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://redis.googleapis.com/v1/projects/{{project}}/locations/{{region}}/instances/{{name}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("RedisInstance still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_redis_instance_test.go b/google/resource_redis_instance_test.go index 0415e9be..940c9957 100644 --- a/google/resource_redis_instance_test.go +++ b/google/resource_redis_instance_test.go @@ -2,10 +2,12 @@ package google import ( "fmt" + "strings" "testing" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" ) func TestAccRedisInstance_basic(t *testing.T) { @@ -83,6 +85,31 @@ func TestAccRedisInstance_full(t *testing.T) { }) } +func testAccCheckRedisInstanceDestroy(s *terraform.State) error { + config := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "google_redis_instance" { + continue + } + + redisIdParts := strings.Split(rs.Primary.ID, "/") + if len(redisIdParts) != 3 { + return fmt.Errorf("Unexpected resource ID %s, expected {project}/{region}/{name}", rs.Primary.ID) + } + + project, region, inst := redisIdParts[0], redisIdParts[1], redisIdParts[2] + + name := fmt.Sprintf("projects/%s/locations/%s/instances/%s", project, region, inst) + _, err := config.clientRedis.Projects.Locations.Get(name).Do() + if err == nil { + return fmt.Errorf("Redis instance still exists") + } + } + + return nil +} + func testAccRedisInstance_basic(name string) string { return fmt.Sprintf(` resource "google_redis_instance" "test" { diff --git a/google/resource_spanner_database.go b/google/resource_spanner_database.go index d1130c4c..639b0102 100644 --- a/google/resource_spanner_database.go +++ b/google/resource_spanner_database.go @@ -2,29 +2,28 @@ package google import ( "fmt" - "github.com/hashicorp/terraform/helper/schema" "log" "net/http" "regexp" + "strings" + + "github.com/hashicorp/terraform/helper/schema" "google.golang.org/api/googleapi" "google.golang.org/api/spanner/v1" ) -const ( - spannerDatabaseNameFormat = "^[a-z][a-z0-9_-]*[a-z0-9]$" -) - func resourceSpannerDatabase() *schema.Resource { return &schema.Resource{ Create: resourceSpannerDatabaseCreate, Read: resourceSpannerDatabaseRead, Delete: resourceSpannerDatabaseDelete, Importer: &schema.ResourceImporter{ - State: resourceSpannerDatabaseImport("name"), + State: resourceSpannerDatabaseImportState, }, Schema: map[string]*schema.Schema{ + "instance": &schema.Schema{ Type: schema.TypeString, Required: true, @@ -32,10 +31,30 @@ func resourceSpannerDatabase() *schema.Resource { }, "name": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateResourceSpannerDatabaseName, + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + + if len(value) < 2 && len(value) > 30 { + errors = append(errors, fmt.Errorf( + "%q must be between 2 and 30 characters in length", k)) + } + if !regexp.MustCompile("^[a-z0-9-]+$").MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q can only contain lowercase letters, numbers and hyphens", k)) + } + if !regexp.MustCompile("^[a-z]").MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q must start with a letter", k)) + } + if !regexp.MustCompile("[a-z0-9]$").MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q must end with a number or a letter", k)) + } + return + }, }, "project": { @@ -135,28 +154,28 @@ func resourceSpannerDatabaseDelete(d *schema.ResourceData, meta interface{}) err return nil } -func resourceSpannerDatabaseImport(databaseField string) schema.StateFunc { - return func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - config := meta.(*Config) - err := parseImportId([]string{ - fmt.Sprintf("projects/(?P[^/]+)/instances/(?P[^/]+)/databases/(?P<%s>[^/]+)", databaseField), - fmt.Sprintf("instances/(?P[^/]+)/databases/(?P<%s>[^/]+)", databaseField), - fmt.Sprintf("(?P[^/]+)/(?P[^/]+)/(?P<%s>[^/]+)", databaseField), - fmt.Sprintf("(?P[^/]+)/(?P<%s>[^/]+)", databaseField), - }, d, config) - if err != nil { - return nil, fmt.Errorf("Error constructing id: %s", err) - } - - id, err := buildSpannerDatabaseId(d, config) - if err != nil { - return nil, fmt.Errorf("Error constructing id: %s", err) - } - - d.SetId(id.terraformId()) - - return []*schema.ResourceData{d}, nil +func resourceSpannerDatabaseImportState(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + config := meta.(*Config) + id, err := importSpannerDatabaseId(d.Id()) + if err != nil { + return nil, err } + + if id.Project != "" { + d.Set("project", id.Project) + } else { + project, err := getProject(d, config) + if err != nil { + return nil, err + } + id.Project = project + } + + d.Set("instance", id.Instance) + d.Set("name", id.Database) + d.SetId(id.terraformId()) + + return []*schema.ResourceData{d}, nil } func buildSpannerDatabaseId(d *schema.ResourceData, config *Config) (*spannerDatabaseId, error) { @@ -164,12 +183,7 @@ func buildSpannerDatabaseId(d *schema.ResourceData, config *Config) (*spannerDat if err != nil { return nil, err } - database, ok := d.GetOk("name") - if !ok { - database = d.Get("database") - } - - dbName := database.(string) + dbName := d.Get("name").(string) instanceName := d.Get("instance").(string) return &spannerDatabaseId{ @@ -201,16 +215,32 @@ func (s spannerDatabaseId) databaseUri() string { return fmt.Sprintf("%s/databases/%s", s.parentInstanceUri(), s.Database) } -func validateResourceSpannerDatabaseName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if len(value) < 2 && len(value) > 30 { - errors = append(errors, fmt.Errorf( - "%q must be between 2 and 30 characters in length", k)) +func importSpannerDatabaseId(id string) (*spannerDatabaseId, error) { + if !regexp.MustCompile("^[a-z0-9-]+/[a-z0-9-]+$").Match([]byte(id)) && + !regexp.MustCompile("^"+ProjectRegex+"/[a-z0-9-]+/[a-z0-9-]+$").Match([]byte(id)) { + return nil, fmt.Errorf("Invalid spanner database specifier. " + + "Expecting either {projectId}/{instanceId}/{dbId} OR " + + "{instanceId}/{dbId} (where project will be derived from the provider)") } - if !regexp.MustCompile(spannerDatabaseNameFormat).MatchString(value) { - errors = append(errors, fmt.Errorf("database name %q must match regexp %q", value, spannerDatabaseNameFormat)) + parts := strings.Split(id, "/") + if len(parts) == 2 { + log.Printf("[INFO] Spanner database import format of {instanceId}/{dbId} specified: %s", id) + return &spannerDatabaseId{Instance: parts[0], Database: parts[1]}, nil } - return + + log.Printf("[INFO] Spanner database import format of {projectId}/{instanceId}/{dbId} specified: %s", id) + return extractSpannerDatabaseId(id) +} + +func extractSpannerDatabaseId(id string) (*spannerDatabaseId, error) { + if !regexp.MustCompile("^" + ProjectRegex + "/[a-z0-9-]+/[a-z0-9-]+$").Match([]byte(id)) { + return nil, fmt.Errorf("Invalid spanner id format, expecting {projectId}/{instanceId}/{databaseId}") + } + parts := strings.Split(id, "/") + return &spannerDatabaseId{ + Project: parts[0], + Instance: parts[1], + Database: parts[2], + }, nil } diff --git a/google/resource_spanner_database_test.go b/google/resource_spanner_database_test.go index d0cd6b51..73e3f71f 100644 --- a/google/resource_spanner_database_test.go +++ b/google/resource_spanner_database_test.go @@ -3,6 +3,7 @@ package google import ( "fmt" "net/http" + "strings" "testing" "github.com/hashicorp/errwrap" @@ -13,49 +14,126 @@ import ( "google.golang.org/api/googleapi" ) +// Unit Tests + +func TestDatabaseNameForApi(t *testing.T) { + id := spannerDatabaseId{ + Project: "project123", + Instance: "instance456", + Database: "db789", + } + actual := id.databaseUri() + expected := "projects/project123/instances/instance456/databases/db789" + expectEquals(t, expected, actual) +} + +func TestImportSpannerDatabaseId_InstanceDB(t *testing.T) { + id, e := importSpannerDatabaseId("instance456/database789") + if e != nil { + t.Errorf("Error should have been nil") + } + expectEquals(t, "", id.Project) + expectEquals(t, "instance456", id.Instance) + expectEquals(t, "database789", id.Database) +} + +func TestImportSpannerDatabaseId_ProjectInstanceDB(t *testing.T) { + id, e := importSpannerDatabaseId("project123/instance456/database789") + if e != nil { + t.Errorf("Error should have been nil") + } + expectEquals(t, "project123", id.Project) + expectEquals(t, "instance456", id.Instance) + expectEquals(t, "database789", id.Database) +} + +func TestImportSpannerDatabaseId_projectId(t *testing.T) { + shouldPass := []string{ + "project-id/instance/database", + "123123/instance/123", + "hashicorptest.net:project-123/instance/123", + "123/456/789", + } + + shouldFail := []string{ + "project-id#/instance/database", + "project-id/instance#/database", + "project-id/instance/database#", + "hashicorptest.net:project-123:invalid:project/instance/123", + "hashicorptest.net:/instance/123", + } + + for _, element := range shouldPass { + _, e := importSpannerDatabaseId(element) + if e != nil { + t.Error("importSpannerDatabaseId should pass on '" + element + "' but doesn't") + } + } + + for _, element := range shouldFail { + _, e := importSpannerDatabaseId(element) + if e == nil { + t.Error("importSpannerDatabaseId should fail on '" + element + "' but doesn't") + } + } +} + +func TestImportSpannerDatabaseId_invalidLeadingSlash(t *testing.T) { + id, e := importSpannerDatabaseId("/instance456/database789") + expectInvalidSpannerDbImportId(t, id, e) +} + +func TestImportSpannerDatabaseId_invalidTrailingSlash(t *testing.T) { + id, e := importSpannerDatabaseId("instance456/database789/") + expectInvalidSpannerDbImportId(t, id, e) +} + +func TestImportSpannerDatabaseId_invalidSingleSlash(t *testing.T) { + id, e := importSpannerDatabaseId("/") + expectInvalidSpannerDbImportId(t, id, e) +} + +func TestImportSpannerDatabaseId_invalidMultiSlash(t *testing.T) { + id, e := importSpannerDatabaseId("project123/instance456/db789/next") + expectInvalidSpannerDbImportId(t, id, e) +} + +func expectInvalidSpannerDbImportId(t *testing.T, id *spannerDatabaseId, e error) { + if id != nil { + t.Errorf("Expected spannerDatabaseId to be nil") + return + } + if e == nil { + t.Errorf("Expected an Error but did not get one") + return + } + if !strings.HasPrefix(e.Error(), "Invalid spanner database specifier") { + t.Errorf("Expecting Error starting with 'Invalid spanner database specifier'") + } +} + +// Acceptance Tests + func TestAccSpannerDatabase_basic(t *testing.T) { t.Parallel() - project := getTestProjectFromEnv() rnd := acctest.RandString(10) - instanceName := fmt.Sprintf("my-instance-%s", rnd) - databaseName := fmt.Sprintf("mydb_%s", rnd) - resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckSpannerDatabaseDestroy, Steps: []resource.TestStep{ { - Config: testAccSpannerDatabase_basic(instanceName, databaseName), + Config: testAccSpannerDatabase_basic(rnd), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrSet("google_spanner_database.basic", "state"), ), }, { - // Test import with default Terraform ID ResourceName: "google_spanner_database.basic", ImportState: true, ImportStateVerify: true, }, - { - ResourceName: "google_spanner_database.basic", - ImportStateId: fmt.Sprintf("projects/%s/instances/%s/databases/%s", project, instanceName, databaseName), - ImportState: true, - ImportStateVerify: true, - }, - { - ResourceName: "google_spanner_database.basic", - ImportStateId: fmt.Sprintf("instances/%s/databases/%s", instanceName, databaseName), - ImportState: true, - ImportStateVerify: true, - }, - { - ResourceName: "google_spanner_database.basic", - ImportStateId: fmt.Sprintf("%s/%s", instanceName, databaseName), - ImportState: true, - ImportStateVerify: true, - }, }, }) } @@ -64,15 +142,13 @@ func TestAccSpannerDatabase_basicWithInitialDDL(t *testing.T) { t.Parallel() rnd := acctest.RandString(10) - instanceName := fmt.Sprintf("my-instance-%s", rnd) - databaseName := fmt.Sprintf("mydb-%s", rnd) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckSpannerDatabaseDestroy, Steps: []resource.TestStep{ { - Config: testAccSpannerDatabase_basicWithInitialDDL(instanceName, databaseName), + Config: testAccSpannerDatabase_basicWithInitialDDL(rnd), }, { ResourceName: "google_spanner_database.basic", @@ -125,49 +201,37 @@ func testAccCheckSpannerDatabaseDestroy(s *terraform.State) error { return nil } -func testAccSpannerDatabase_basic(instanceName, databaseName string) string { +func testAccSpannerDatabase_basic(rnd string) string { return fmt.Sprintf(` resource "google_spanner_instance" "basic" { - name = "%s" + name = "my-instance-%s" config = "regional-us-central1" - display_name = "display-%s" + display_name = "my-displayname-%s" num_nodes = 1 } resource "google_spanner_database" "basic" { instance = "${google_spanner_instance.basic.name}" - name = "%s" + name = "my-db-%s" } -`, instanceName, instanceName, databaseName) +`, rnd, rnd, rnd) } -func testAccSpannerDatabase_basicWithInitialDDL(instanceName, databaseName string) string { +func testAccSpannerDatabase_basicWithInitialDDL(rnd string) string { return fmt.Sprintf(` resource "google_spanner_instance" "basic" { - name = "%s" + name = "my-instance-%s" config = "regional-us-central1" - display_name = "display-%s" + display_name = "my-displayname-%s" num_nodes = 1 } resource "google_spanner_database" "basic" { instance = "${google_spanner_instance.basic.name}" - name = "%s" + name = "my-db-%s" ddl = [ "CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)", "CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)" ] } -`, instanceName, instanceName, databaseName) -} - -// Unit Tests for type spannerDatabaseId -func TestDatabaseNameForApi(t *testing.T) { - id := spannerDatabaseId{ - Project: "project123", - Instance: "instance456", - Database: "db789", - } - actual := id.databaseUri() - expected := "projects/project123/instances/instance456/databases/db789" - expectEquals(t, expected, actual) +`, rnd, rnd, rnd) } diff --git a/google/resource_sql_database_instance.go b/google/resource_sql_database_instance.go index 7dc2f553..1b425743 100644 --- a/google/resource_sql_database_instance.go +++ b/google/resource_sql_database_instance.go @@ -16,8 +16,6 @@ import ( "google.golang.org/api/sqladmin/v1beta4" ) -const privateNetworkLinkRegex = "projects/(" + ProjectRegex + ")/global/networks/((?:[a-z](?:[-a-z0-9]*[a-z0-9])?))$" - var sqlDatabaseAuthorizedNetWorkSchemaElem *schema.Resource = &schema.Resource{ Schema: map[string]*schema.Schema{ "expiration_time": &schema.Schema{ @@ -182,12 +180,6 @@ func resourceSqlDatabaseInstance() *schema.Resource { Type: schema.TypeBool, Optional: true, }, - "private_network": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateRegexp(privateNetworkLinkRegex), - DiffSuppressFunc: compareSelfLinkRelativePaths, - }, }, }, }, @@ -623,7 +615,6 @@ func expandIpConfiguration(configured []interface{}) *sqladmin.IpConfiguration { return &sqladmin.IpConfiguration{ Ipv4Enabled: _ipConfiguration["ipv4_enabled"].(bool), RequireSsl: _ipConfiguration["require_ssl"].(bool), - PrivateNetwork: _ipConfiguration["private_network"].(string), AuthorizedNetworks: expandAuthorizedNetworks(_ipConfiguration["authorized_networks"].(*schema.Set).List()), } } @@ -1130,9 +1121,8 @@ func flattenDatabaseFlags(databaseFlags []*sqladmin.DatabaseFlags) []map[string] func flattenIpConfiguration(ipConfiguration *sqladmin.IpConfiguration) interface{} { data := map[string]interface{}{ - "ipv4_enabled": ipConfiguration.Ipv4Enabled, - "private_network": ipConfiguration.PrivateNetwork, - "require_ssl": ipConfiguration.RequireSsl, + "ipv4_enabled": ipConfiguration.Ipv4Enabled, + "require_ssl": ipConfiguration.RequireSsl, } if ipConfiguration.AuthorizedNetworks != nil { diff --git a/google/resource_sql_ssl_cert.go b/google/resource_sql_ssl_cert.go deleted file mode 100644 index 7337b3fb..00000000 --- a/google/resource_sql_ssl_cert.go +++ /dev/null @@ -1,177 +0,0 @@ -package google - -import ( - "fmt" - "log" - - "github.com/hashicorp/terraform/helper/schema" - "google.golang.org/api/sqladmin/v1beta4" -) - -func resourceSqlSslCert() *schema.Resource { - return &schema.Resource{ - Create: resourceSqlSslCertCreate, - Read: resourceSqlSslCertRead, - Delete: resourceSqlSslCertDelete, - - SchemaVersion: 1, - - Schema: map[string]*schema.Schema{ - "common_name": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "instance": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "cert": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, - - "cert_serial_number": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, - - "create_time": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, - - "expiration_time": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, - - "private_key": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - Sensitive: true, - }, - - "server_ca_cert": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, - - "sha1_fingerprint": &schema.Schema{ - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceSqlSslCertCreate(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - project, err := getProject(d, config) - if err != nil { - return err - } - - instance := d.Get("instance").(string) - commonName := d.Get("common_name").(string) - - sslCertsInsertRequest := &sqladmin.SslCertsInsertRequest{ - CommonName: commonName, - } - - mutexKV.Lock(instanceMutexKey(project, instance)) - defer mutexKV.Unlock(instanceMutexKey(project, instance)) - resp, err := config.clientSqlAdmin.SslCerts.Insert(project, instance, sslCertsInsertRequest).Do() - if err != nil { - return fmt.Errorf("Error, failed to insert "+ - "ssl cert %s into instance %s: %s", commonName, instance, err) - } - - err = sqladminOperationWait(config, resp.Operation, project, "Create Ssl Cert") - if err != nil { - return fmt.Errorf("Error, failure waiting for creation of %q "+ - "in %q: %s", commonName, instance, err) - } - - fingerprint := resp.ClientCert.CertInfo.Sha1Fingerprint - d.SetId(fmt.Sprintf("%s/%s", instance, fingerprint)) - d.Set("sha1_fingerprint", fingerprint) - - // The private key is only returned on the initial insert so set it here. - d.Set("private_key", resp.ClientCert.CertPrivateKey) - d.Set("server_ca_cert", resp.ServerCaCert.Cert) - - return resourceSqlSslCertRead(d, meta) -} - -func resourceSqlSslCertRead(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - project, err := getProject(d, config) - if err != nil { - return err - } - - instance := d.Get("instance").(string) - commonName := d.Get("common_name").(string) - fingerprint := d.Get("sha1_fingerprint").(string) - - sslCerts, err := config.clientSqlAdmin.SslCerts.Get(project, instance, fingerprint).Do() - if err != nil { - return handleNotFoundError(err, d, fmt.Sprintf("SQL Ssl Cert %q in instance %q", commonName, instance)) - } - - if sslCerts == nil { - log.Printf("[WARN] Removing SQL Ssl Cert %q because it's gone", commonName) - d.SetId("") - - return nil - } - - d.Set("instance", sslCerts.Instance) - d.Set("sha1_fingerprint", sslCerts.Sha1Fingerprint) - d.Set("common_name", sslCerts.CommonName) - d.Set("cert", sslCerts.Cert) - d.Set("cert_serial_number", sslCerts.CertSerialNumber) - d.Set("create_time", sslCerts.CreateTime) - d.Set("expiration_time", sslCerts.ExpirationTime) - - d.SetId(fmt.Sprintf("%s/%s", instance, fingerprint)) - return nil -} - -func resourceSqlSslCertDelete(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - project, err := getProject(d, config) - if err != nil { - return err - } - - instance := d.Get("instance").(string) - commonName := d.Get("common_name").(string) - fingerprint := d.Get("sha1_fingerprint").(string) - - mutexKV.Lock(instanceMutexKey(project, instance)) - defer mutexKV.Unlock(instanceMutexKey(project, instance)) - op, err := config.clientSqlAdmin.SslCerts.Delete(project, instance, fingerprint).Do() - - if err != nil { - return fmt.Errorf("Error, failed to delete "+ - "ssl cert %q in instance %q: %s", commonName, - instance, err) - } - - err = sqladminOperationWait(config, op, project, "Delete Ssl Cert") - - if err != nil { - return fmt.Errorf("Error, failure waiting for deletion of ssl cert %q "+ - "in %q: %s", commonName, instance, err) - } - - return nil -} diff --git a/google/resource_sql_ssl_cert_test.go b/google/resource_sql_ssl_cert_test.go deleted file mode 100644 index 90df41e0..00000000 --- a/google/resource_sql_ssl_cert_test.go +++ /dev/null @@ -1,136 +0,0 @@ -package google - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" -) - -func TestAccSqlClientCert_mysql(t *testing.T) { - t.Parallel() - - instance := acctest.RandomWithPrefix("i") - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccSqlClientCertDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testGoogleSqlClientCert_mysql(instance), - Check: resource.ComposeTestCheckFunc( - testAccCheckGoogleSqlClientCertExists("google_sql_ssl_cert.cert1"), - testAccCheckGoogleSqlClientCertExists("google_sql_ssl_cert.cert2"), - ), - }, - }, - }) -} - -func TestAccSqlClientCert_postgres(t *testing.T) { - t.Parallel() - - instance := acctest.RandomWithPrefix("i") - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccSqlClientCertDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testGoogleSqlClientCert_postgres(instance), - Check: resource.ComposeTestCheckFunc( - testAccCheckGoogleSqlClientCertExists("google_sql_ssl_cert.cert"), - ), - }, - }, - }) -} - -func testAccCheckGoogleSqlClientCertExists(n string) resource.TestCheckFunc { - return func(s *terraform.State) error { - config := testAccProvider.Meta().(*Config) - rs, ok := s.RootModule().Resources[n] - if !ok { - return fmt.Errorf("Resource not found: %s", n) - } - - instance := rs.Primary.Attributes["instance"] - fingerprint := rs.Primary.Attributes["sha1_fingerprint"] - sslClientCert, err := config.clientSqlAdmin.SslCerts.Get(config.Project, instance, fingerprint).Do() - - if err != nil { - return err - } - - if sslClientCert.Instance == instance && sslClientCert.Sha1Fingerprint == fingerprint { - return nil - } - - return fmt.Errorf("Not found: %s: %s", n, err) - } -} - -func testAccSqlClientCertDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - config := testAccProvider.Meta().(*Config) - if rs.Type != "google_sql_ssl_cert" { - continue - } - - fingerprint := rs.Primary.Attributes["sha1_fingerprint"] - instance := rs.Primary.Attributes["instance"] - sslCert, _ := config.clientSqlAdmin.SslCerts.Get(config.Project, instance, fingerprint).Do() - - commonName := rs.Primary.Attributes["common_name"] - if sslCert != nil { - return fmt.Errorf("Client cert %q still exists, should have been destroyed", commonName) - } - - return nil - } - - return nil -} - -func testGoogleSqlClientCert_mysql(instance string) string { - return fmt.Sprintf(` - resource "google_sql_database_instance" "instance" { - name = "%s" - region = "us-central" - settings { - tier = "D0" - } - } - - resource "google_sql_ssl_cert" "cert1" { - common_name = "cert1" - instance = "${google_sql_database_instance.instance.name}" - } - - resource "google_sql_ssl_cert" "cert2" { - common_name = "cert2" - instance = "${google_sql_database_instance.instance.name}" - } - `, instance) -} - -func testGoogleSqlClientCert_postgres(instance string) string { - return fmt.Sprintf(` - resource "google_sql_database_instance" "instance" { - name = "%s" - region = "us-central1" - database_version = "POSTGRES_9_6" - - settings { - tier = "db-f1-micro" - } - } - - resource "google_sql_ssl_cert" "cert" { - common_name = "cert" - instance = "${google_sql_database_instance.instance.name}" - } - `, instance) -} diff --git a/google/resource_sql_user.go b/google/resource_sql_user.go index bc79aa9b..4ff1ab72 100644 --- a/google/resource_sql_user.go +++ b/google/resource_sql_user.go @@ -171,7 +171,7 @@ func resourceSqlUserUpdate(d *schema.ResourceData, meta interface{}) error { mutexKV.Lock(instanceMutexKey(project, instance)) defer mutexKV.Unlock(instanceMutexKey(project, instance)) - op, err := config.clientSqlAdmin.Users.Update(project, instance, name, + op, err := config.clientSqlAdmin.Users.Update(project, instance, host, name, user).Do() if err != nil { diff --git a/google/resource_storage_default_object_access_control.go b/google/resource_storage_default_object_access_control.go deleted file mode 100644 index 5ae86adb..00000000 --- a/google/resource_storage_default_object_access_control.go +++ /dev/null @@ -1,333 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - -package google - -import ( - "fmt" - "log" - "reflect" - "strconv" - - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceStorageDefaultObjectAccessControl() *schema.Resource { - return &schema.Resource{ - Create: resourceStorageDefaultObjectAccessControlCreate, - Read: resourceStorageDefaultObjectAccessControlRead, - Update: resourceStorageDefaultObjectAccessControlUpdate, - Delete: resourceStorageDefaultObjectAccessControlDelete, - - Importer: &schema.ResourceImporter{ - State: resourceStorageDefaultObjectAccessControlImport, - }, - - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Required: true, - DiffSuppressFunc: compareSelfLinkOrResourceName, - }, - "entity": { - Type: schema.TypeString, - Required: true, - }, - "role": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{"OWNER", "READER"}, false), - }, - "object": { - Type: schema.TypeString, - Optional: true, - }, - "domain": { - Type: schema.TypeString, - Computed: true, - }, - "email": { - Type: schema.TypeString, - Computed: true, - }, - "entity_id": { - Type: schema.TypeString, - Computed: true, - }, - "generation": { - Type: schema.TypeInt, - Computed: true, - }, - "project_team": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "project_number": { - Type: schema.TypeString, - Optional: true, - }, - "team": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{"editors", "owners", "viewers", ""}, false), - }, - }, - }, - }, - }, - } -} - -func resourceStorageDefaultObjectAccessControlCreate(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - obj := make(map[string]interface{}) - bucketProp, err := expandStorageDefaultObjectAccessControlBucket(d.Get("bucket"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("bucket"); !isEmptyValue(reflect.ValueOf(bucketProp)) && (ok || !reflect.DeepEqual(v, bucketProp)) { - obj["bucket"] = bucketProp - } - entityProp, err := expandStorageDefaultObjectAccessControlEntity(d.Get("entity"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("entity"); !isEmptyValue(reflect.ValueOf(entityProp)) && (ok || !reflect.DeepEqual(v, entityProp)) { - obj["entity"] = entityProp - } - objectProp, err := expandStorageDefaultObjectAccessControlObject(d.Get("object"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("object"); !isEmptyValue(reflect.ValueOf(objectProp)) && (ok || !reflect.DeepEqual(v, objectProp)) { - obj["object"] = objectProp - } - roleProp, err := expandStorageDefaultObjectAccessControlRole(d.Get("role"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("role"); !isEmptyValue(reflect.ValueOf(roleProp)) && (ok || !reflect.DeepEqual(v, roleProp)) { - obj["role"] = roleProp - } - - url, err := replaceVars(d, config, "https://www.googleapis.com/storage/v1/b/{{bucket}}/defaultObjectAcl") - if err != nil { - return err - } - - log.Printf("[DEBUG] Creating new DefaultObjectAccessControl: %#v", obj) - res, err := sendRequest(config, "POST", url, obj) - if err != nil { - return fmt.Errorf("Error creating DefaultObjectAccessControl: %s", err) - } - - // Store the ID now - id, err := replaceVars(d, config, "{{bucket}}/{{entity}}") - if err != nil { - return fmt.Errorf("Error constructing id: %s", err) - } - d.SetId(id) - - log.Printf("[DEBUG] Finished creating DefaultObjectAccessControl %q: %#v", d.Id(), res) - - return resourceStorageDefaultObjectAccessControlRead(d, meta) -} - -func resourceStorageDefaultObjectAccessControlRead(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - url, err := replaceVars(d, config, "https://www.googleapis.com/storage/v1/b/{{bucket}}/defaultObjectAcl/{{entity}}") - if err != nil { - return err - } - - res, err := sendRequest(config, "GET", url, nil) - if err != nil { - return handleNotFoundError(err, d, fmt.Sprintf("StorageDefaultObjectAccessControl %q", d.Id())) - } - - if err := d.Set("domain", flattenStorageDefaultObjectAccessControlDomain(res["domain"])); err != nil { - return fmt.Errorf("Error reading DefaultObjectAccessControl: %s", err) - } - if err := d.Set("email", flattenStorageDefaultObjectAccessControlEmail(res["email"])); err != nil { - return fmt.Errorf("Error reading DefaultObjectAccessControl: %s", err) - } - if err := d.Set("entity", flattenStorageDefaultObjectAccessControlEntity(res["entity"])); err != nil { - return fmt.Errorf("Error reading DefaultObjectAccessControl: %s", err) - } - if err := d.Set("entity_id", flattenStorageDefaultObjectAccessControlEntityId(res["entityId"])); err != nil { - return fmt.Errorf("Error reading DefaultObjectAccessControl: %s", err) - } - if err := d.Set("generation", flattenStorageDefaultObjectAccessControlGeneration(res["generation"])); err != nil { - return fmt.Errorf("Error reading DefaultObjectAccessControl: %s", err) - } - if err := d.Set("object", flattenStorageDefaultObjectAccessControlObject(res["object"])); err != nil { - return fmt.Errorf("Error reading DefaultObjectAccessControl: %s", err) - } - if err := d.Set("project_team", flattenStorageDefaultObjectAccessControlProjectTeam(res["projectTeam"])); err != nil { - return fmt.Errorf("Error reading DefaultObjectAccessControl: %s", err) - } - if err := d.Set("role", flattenStorageDefaultObjectAccessControlRole(res["role"])); err != nil { - return fmt.Errorf("Error reading DefaultObjectAccessControl: %s", err) - } - - return nil -} - -func resourceStorageDefaultObjectAccessControlUpdate(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - obj := make(map[string]interface{}) - bucketProp, err := expandStorageDefaultObjectAccessControlBucket(d.Get("bucket"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("bucket"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, bucketProp)) { - obj["bucket"] = bucketProp - } - entityProp, err := expandStorageDefaultObjectAccessControlEntity(d.Get("entity"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("entity"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, entityProp)) { - obj["entity"] = entityProp - } - objectProp, err := expandStorageDefaultObjectAccessControlObject(d.Get("object"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("object"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, objectProp)) { - obj["object"] = objectProp - } - roleProp, err := expandStorageDefaultObjectAccessControlRole(d.Get("role"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("role"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, roleProp)) { - obj["role"] = roleProp - } - - url, err := replaceVars(d, config, "https://www.googleapis.com/storage/v1/b/{{bucket}}/defaultObjectAcl/{{entity}}") - if err != nil { - return err - } - - log.Printf("[DEBUG] Updating DefaultObjectAccessControl %q: %#v", d.Id(), obj) - _, err = sendRequest(config, "PUT", url, obj) - - if err != nil { - return fmt.Errorf("Error updating DefaultObjectAccessControl %q: %s", d.Id(), err) - } - - return resourceStorageDefaultObjectAccessControlRead(d, meta) -} - -func resourceStorageDefaultObjectAccessControlDelete(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - url, err := replaceVars(d, config, "https://www.googleapis.com/storage/v1/b/{{bucket}}/defaultObjectAcl/{{entity}}") - if err != nil { - return err - } - - var obj map[string]interface{} - log.Printf("[DEBUG] Deleting DefaultObjectAccessControl %q", d.Id()) - res, err := sendRequest(config, "DELETE", url, obj) - if err != nil { - return handleNotFoundError(err, d, "DefaultObjectAccessControl") - } - - log.Printf("[DEBUG] Finished deleting DefaultObjectAccessControl %q: %#v", d.Id(), res) - return nil -} - -func resourceStorageDefaultObjectAccessControlImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - config := meta.(*Config) - parseImportId([]string{"(?P[^/]+)/(?P[^/]+)"}, d, config) - - // Replace import id for the resource id - id, err := replaceVars(d, config, "{{bucket}}/{{entity}}") - if err != nil { - return nil, fmt.Errorf("Error constructing id: %s", err) - } - d.SetId(id) - - return []*schema.ResourceData{d}, nil -} - -func flattenStorageDefaultObjectAccessControlDomain(v interface{}) interface{} { - return v -} - -func flattenStorageDefaultObjectAccessControlEmail(v interface{}) interface{} { - return v -} - -func flattenStorageDefaultObjectAccessControlEntity(v interface{}) interface{} { - return v -} - -func flattenStorageDefaultObjectAccessControlEntityId(v interface{}) interface{} { - return v -} - -func flattenStorageDefaultObjectAccessControlGeneration(v interface{}) interface{} { - // Handles the string fixed64 format - if strVal, ok := v.(string); ok { - if intVal, err := strconv.ParseInt(strVal, 10, 64); err == nil { - return intVal - } // let terraform core handle it if we can't convert the string to an int. - } - return v -} - -func flattenStorageDefaultObjectAccessControlObject(v interface{}) interface{} { - return v -} - -func flattenStorageDefaultObjectAccessControlProjectTeam(v interface{}) interface{} { - if v == nil { - return nil - } - original := v.(map[string]interface{}) - transformed := make(map[string]interface{}) - transformed["project_number"] = - flattenStorageDefaultObjectAccessControlProjectTeamProjectNumber(original["projectNumber"]) - transformed["team"] = - flattenStorageDefaultObjectAccessControlProjectTeamTeam(original["team"]) - return []interface{}{transformed} -} -func flattenStorageDefaultObjectAccessControlProjectTeamProjectNumber(v interface{}) interface{} { - return v -} - -func flattenStorageDefaultObjectAccessControlProjectTeamTeam(v interface{}) interface{} { - return v -} - -func flattenStorageDefaultObjectAccessControlRole(v interface{}) interface{} { - return v -} - -func expandStorageDefaultObjectAccessControlBucket(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandStorageDefaultObjectAccessControlEntity(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandStorageDefaultObjectAccessControlObject(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandStorageDefaultObjectAccessControlRole(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} diff --git a/google/resource_storage_default_object_access_control_generated_test.go b/google/resource_storage_default_object_access_control_generated_test.go deleted file mode 100644 index 67bd4b5f..00000000 --- a/google/resource_storage_default_object_access_control_generated_test.go +++ /dev/null @@ -1,82 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - -package google - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" -) - -func TestAccStorageDefaultObjectAccessControl_StorageDefaultObjectAccessControlPublicExample(t *testing.T) { - t.Parallel() - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckStorageDefaultObjectAccessControlDestroy, - Steps: []resource.TestStep{ - { - Config: testAccStorageDefaultObjectAccessControl_StorageDefaultObjectAccessControlPublicExample(acctest.RandString(10)), - }, - { - ResourceName: "google_storage_default_object_access_control.public_rule", - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"bucket"}, - }, - }, - }) -} - -func testAccStorageDefaultObjectAccessControl_StorageDefaultObjectAccessControlPublicExample(val string) string { - return fmt.Sprintf(` -resource "google_storage_default_object_access_control" "public_rule" { - bucket = "${google_storage_bucket.bucket.name}" - role = "READER" - entity = "allUsers" -} - -resource "google_storage_bucket" "bucket" { - name = "static-content-bucket-%s" -} -`, val, - ) -} - -func testAccCheckStorageDefaultObjectAccessControlDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_storage_default_object_access_control" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/storage/v1/b/{{bucket}}/defaultObjectAcl/{{entity}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("StorageDefaultObjectAccessControl still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_storage_default_object_access_control_test.go b/google/resource_storage_default_object_access_control_test.go deleted file mode 100644 index a3fca09c..00000000 --- a/google/resource_storage_default_object_access_control_test.go +++ /dev/null @@ -1,110 +0,0 @@ -package google - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" -) - -func TestAccStorageDefaultObjectAccessControl_basic(t *testing.T) { - t.Parallel() - - bucketName := testBucketName() - resource.Test(t, resource.TestCase{ - PreCheck: func() { - if errObjectAcl != nil { - panic(errObjectAcl) - } - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccStorageDefaultObjectAccessControlDestroy, - Steps: []resource.TestStep{ - { - Config: testGoogleStorageDefaultObjectAccessControlBasic(bucketName, "READER", "allUsers"), - }, - { - ResourceName: "google_storage_default_object_access_control.default", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccStorageDefaultObjectAccessControl_update(t *testing.T) { - t.Parallel() - - bucketName := testBucketName() - resource.Test(t, resource.TestCase{ - PreCheck: func() { - if errObjectAcl != nil { - panic(errObjectAcl) - } - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccStorageDefaultObjectAccessControlDestroy, - Steps: []resource.TestStep{ - { - Config: testGoogleStorageDefaultObjectAccessControlBasic(bucketName, "READER", "allUsers"), - }, - { - ResourceName: "google_storage_default_object_access_control.default", - ImportState: true, - ImportStateVerify: true, - }, - { - Config: testGoogleStorageDefaultObjectAccessControlBasic(bucketName, "OWNER", "allUsers"), - }, - { - ResourceName: "google_storage_default_object_access_control.default", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccStorageDefaultObjectAccessControlDestroy(s *terraform.State) error { - config := testAccProvider.Meta().(*Config) - - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_storage_bucket_acl" { - continue - } - - bucket := rs.Primary.Attributes["bucket"] - entity := rs.Primary.Attributes["entity"] - - rePairs, err := config.clientStorage.DefaultObjectAccessControls.List(bucket).Do() - if err != nil { - return fmt.Errorf("Can't list role entity acl for bucket %s", bucket) - } - - for _, v := range rePairs.Items { - if v.Entity == entity { - return fmt.Errorf("found entity %s as role entity acl entry in bucket %s", entity, bucket) - } - } - - } - - return nil -} - -func testGoogleStorageDefaultObjectAccessControlBasic(bucketName, role, entity string) string { - return fmt.Sprintf(` -resource "google_storage_bucket" "bucket" { - name = "%s" -} - -resource "google_storage_default_object_access_control" "default" { - bucket = "${google_storage_bucket.bucket.name}" - role = "%s" - entity = "%s" -} -`, bucketName, role, entity) -} diff --git a/google/resource_storage_object_access_control.go b/google/resource_storage_object_access_control.go deleted file mode 100644 index 5b6e57ee..00000000 --- a/google/resource_storage_object_access_control.go +++ /dev/null @@ -1,343 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - -package google - -import ( - "fmt" - "log" - "reflect" - "strconv" - - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" -) - -func resourceStorageObjectAccessControl() *schema.Resource { - return &schema.Resource{ - Create: resourceStorageObjectAccessControlCreate, - Read: resourceStorageObjectAccessControlRead, - Update: resourceStorageObjectAccessControlUpdate, - Delete: resourceStorageObjectAccessControlDelete, - - Importer: &schema.ResourceImporter{ - State: resourceStorageObjectAccessControlImport, - }, - - Schema: map[string]*schema.Schema{ - "bucket": { - Type: schema.TypeString, - Required: true, - DiffSuppressFunc: compareSelfLinkOrResourceName, - }, - "entity": { - Type: schema.TypeString, - Required: true, - }, - "object": { - Type: schema.TypeString, - Required: true, - }, - "role": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{"OWNER", "READER"}, false), - }, - "domain": { - Type: schema.TypeString, - Computed: true, - }, - "email": { - Type: schema.TypeString, - Computed: true, - }, - "entity_id": { - Type: schema.TypeString, - Computed: true, - }, - "generation": { - Type: schema.TypeInt, - Computed: true, - }, - "project_team": { - Type: schema.TypeList, - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "project_number": { - Type: schema.TypeString, - Optional: true, - }, - "team": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{"editors", "owners", "viewers", ""}, false), - }, - }, - }, - }, - }, - } -} - -func resourceStorageObjectAccessControlCreate(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - obj := make(map[string]interface{}) - bucketProp, err := expandStorageObjectAccessControlBucket(d.Get("bucket"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("bucket"); !isEmptyValue(reflect.ValueOf(bucketProp)) && (ok || !reflect.DeepEqual(v, bucketProp)) { - obj["bucket"] = bucketProp - } - entityProp, err := expandStorageObjectAccessControlEntity(d.Get("entity"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("entity"); !isEmptyValue(reflect.ValueOf(entityProp)) && (ok || !reflect.DeepEqual(v, entityProp)) { - obj["entity"] = entityProp - } - objectProp, err := expandStorageObjectAccessControlObject(d.Get("object"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("object"); !isEmptyValue(reflect.ValueOf(objectProp)) && (ok || !reflect.DeepEqual(v, objectProp)) { - obj["object"] = objectProp - } - roleProp, err := expandStorageObjectAccessControlRole(d.Get("role"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("role"); !isEmptyValue(reflect.ValueOf(roleProp)) && (ok || !reflect.DeepEqual(v, roleProp)) { - obj["role"] = roleProp - } - - url, err := replaceVars(d, config, "https://www.googleapis.com/storage/v1/b/{{bucket}}/o/{{object}}/acl") - if err != nil { - return err - } - - log.Printf("[DEBUG] Creating new ObjectAccessControl: %#v", obj) - res, err := sendRequest(config, "POST", url, obj) - if err != nil { - return fmt.Errorf("Error creating ObjectAccessControl: %s", err) - } - - // Store the ID now - id, err := replaceVars(d, config, "{{bucket}}/{{object}}/{{entity}}") - if err != nil { - return fmt.Errorf("Error constructing id: %s", err) - } - d.SetId(id) - - log.Printf("[DEBUG] Finished creating ObjectAccessControl %q: %#v", d.Id(), res) - - return resourceStorageObjectAccessControlRead(d, meta) -} - -func resourceStorageObjectAccessControlRead(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - url, err := replaceVars(d, config, "https://www.googleapis.com/storage/v1/b/{{bucket}}/o/{{object}}/acl/{{entity}}") - if err != nil { - return err - } - - res, err := sendRequest(config, "GET", url, nil) - if err != nil { - return handleNotFoundError(err, d, fmt.Sprintf("StorageObjectAccessControl %q", d.Id())) - } - - if err := d.Set("bucket", flattenStorageObjectAccessControlBucket(res["bucket"])); err != nil { - return fmt.Errorf("Error reading ObjectAccessControl: %s", err) - } - if err := d.Set("domain", flattenStorageObjectAccessControlDomain(res["domain"])); err != nil { - return fmt.Errorf("Error reading ObjectAccessControl: %s", err) - } - if err := d.Set("email", flattenStorageObjectAccessControlEmail(res["email"])); err != nil { - return fmt.Errorf("Error reading ObjectAccessControl: %s", err) - } - if err := d.Set("entity", flattenStorageObjectAccessControlEntity(res["entity"])); err != nil { - return fmt.Errorf("Error reading ObjectAccessControl: %s", err) - } - if err := d.Set("entity_id", flattenStorageObjectAccessControlEntityId(res["entityId"])); err != nil { - return fmt.Errorf("Error reading ObjectAccessControl: %s", err) - } - if err := d.Set("generation", flattenStorageObjectAccessControlGeneration(res["generation"])); err != nil { - return fmt.Errorf("Error reading ObjectAccessControl: %s", err) - } - if err := d.Set("object", flattenStorageObjectAccessControlObject(res["object"])); err != nil { - return fmt.Errorf("Error reading ObjectAccessControl: %s", err) - } - if err := d.Set("project_team", flattenStorageObjectAccessControlProjectTeam(res["projectTeam"])); err != nil { - return fmt.Errorf("Error reading ObjectAccessControl: %s", err) - } - if err := d.Set("role", flattenStorageObjectAccessControlRole(res["role"])); err != nil { - return fmt.Errorf("Error reading ObjectAccessControl: %s", err) - } - - return nil -} - -func resourceStorageObjectAccessControlUpdate(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - obj := make(map[string]interface{}) - bucketProp, err := expandStorageObjectAccessControlBucket(d.Get("bucket"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("bucket"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, bucketProp)) { - obj["bucket"] = bucketProp - } - entityProp, err := expandStorageObjectAccessControlEntity(d.Get("entity"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("entity"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, entityProp)) { - obj["entity"] = entityProp - } - objectProp, err := expandStorageObjectAccessControlObject(d.Get("object"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("object"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, objectProp)) { - obj["object"] = objectProp - } - roleProp, err := expandStorageObjectAccessControlRole(d.Get("role"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("role"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, roleProp)) { - obj["role"] = roleProp - } - - url, err := replaceVars(d, config, "https://www.googleapis.com/storage/v1/b/{{bucket}}/o/{{object}}/acl/{{entity}}") - if err != nil { - return err - } - - log.Printf("[DEBUG] Updating ObjectAccessControl %q: %#v", d.Id(), obj) - _, err = sendRequest(config, "PUT", url, obj) - - if err != nil { - return fmt.Errorf("Error updating ObjectAccessControl %q: %s", d.Id(), err) - } - - return resourceStorageObjectAccessControlRead(d, meta) -} - -func resourceStorageObjectAccessControlDelete(d *schema.ResourceData, meta interface{}) error { - config := meta.(*Config) - - url, err := replaceVars(d, config, "https://www.googleapis.com/storage/v1/b/{{bucket}}/o/{{object}}/acl/{{entity}}") - if err != nil { - return err - } - - var obj map[string]interface{} - log.Printf("[DEBUG] Deleting ObjectAccessControl %q", d.Id()) - res, err := sendRequest(config, "DELETE", url, obj) - if err != nil { - return handleNotFoundError(err, d, "ObjectAccessControl") - } - - log.Printf("[DEBUG] Finished deleting ObjectAccessControl %q: %#v", d.Id(), res) - return nil -} - -func resourceStorageObjectAccessControlImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - config := meta.(*Config) - parseImportId([]string{"(?P[^/]+)/(?P[^/]+)/(?P[^/]+)"}, d, config) - - // Replace import id for the resource id - id, err := replaceVars(d, config, "{{bucket}}/{{object}}/{{entity}}") - if err != nil { - return nil, fmt.Errorf("Error constructing id: %s", err) - } - d.SetId(id) - - return []*schema.ResourceData{d}, nil -} - -func flattenStorageObjectAccessControlBucket(v interface{}) interface{} { - if v == nil { - return v - } - return ConvertSelfLinkToV1(v.(string)) -} - -func flattenStorageObjectAccessControlDomain(v interface{}) interface{} { - return v -} - -func flattenStorageObjectAccessControlEmail(v interface{}) interface{} { - return v -} - -func flattenStorageObjectAccessControlEntity(v interface{}) interface{} { - return v -} - -func flattenStorageObjectAccessControlEntityId(v interface{}) interface{} { - return v -} - -func flattenStorageObjectAccessControlGeneration(v interface{}) interface{} { - // Handles the string fixed64 format - if strVal, ok := v.(string); ok { - if intVal, err := strconv.ParseInt(strVal, 10, 64); err == nil { - return intVal - } // let terraform core handle it if we can't convert the string to an int. - } - return v -} - -func flattenStorageObjectAccessControlObject(v interface{}) interface{} { - return v -} - -func flattenStorageObjectAccessControlProjectTeam(v interface{}) interface{} { - if v == nil { - return nil - } - original := v.(map[string]interface{}) - transformed := make(map[string]interface{}) - transformed["project_number"] = - flattenStorageObjectAccessControlProjectTeamProjectNumber(original["projectNumber"]) - transformed["team"] = - flattenStorageObjectAccessControlProjectTeamTeam(original["team"]) - return []interface{}{transformed} -} -func flattenStorageObjectAccessControlProjectTeamProjectNumber(v interface{}) interface{} { - return v -} - -func flattenStorageObjectAccessControlProjectTeamTeam(v interface{}) interface{} { - return v -} - -func flattenStorageObjectAccessControlRole(v interface{}) interface{} { - return v -} - -func expandStorageObjectAccessControlBucket(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandStorageObjectAccessControlEntity(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandStorageObjectAccessControlObject(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} - -func expandStorageObjectAccessControlRole(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) { - return v, nil -} diff --git a/google/resource_storage_object_access_control_generated_test.go b/google/resource_storage_object_access_control_generated_test.go deleted file mode 100644 index 1a051d92..00000000 --- a/google/resource_storage_object_access_control_generated_test.go +++ /dev/null @@ -1,88 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - -package google - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" -) - -func TestAccStorageObjectAccessControl_StorageObjectAccessControlPublicObjectExample(t *testing.T) { - t.Parallel() - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckStorageObjectAccessControlDestroy, - Steps: []resource.TestStep{ - { - Config: testAccStorageObjectAccessControl_StorageObjectAccessControlPublicObjectExample(acctest.RandString(10)), - }, - { - ResourceName: "google_storage_object_access_control.public_rule", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccStorageObjectAccessControl_StorageObjectAccessControlPublicObjectExample(val string) string { - return fmt.Sprintf(` -resource "google_storage_object_access_control" "public_rule" { - object = "${google_storage_bucket_object.object.name}" - bucket = "${google_storage_bucket.bucket.name}" - role = "READER" - entity = "allUsers" -} - -resource "google_storage_bucket" "bucket" { - name = "static-content-bucket-%s" -} - - resource "google_storage_bucket_object" "object" { - name = "public-object-%s" - bucket = "${google_storage_bucket.bucket.name}" - source = "test-fixtures/header-logo.png" -} -`, val, val, - ) -} - -func testAccCheckStorageObjectAccessControlDestroy(s *terraform.State) error { - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_storage_object_access_control" { - continue - } - - config := testAccProvider.Meta().(*Config) - - url, err := replaceVarsForTest(rs, "https://www.googleapis.com/storage/v1/b/{{bucket}}/o/{{object}}/acl/{{entity}}") - if err != nil { - return err - } - - _, err = sendRequest(config, "GET", url, nil) - if err == nil { - return fmt.Errorf("StorageObjectAccessControl still exists at %s", url) - } - } - - return nil -} diff --git a/google/resource_storage_object_access_control_test.go b/google/resource_storage_object_access_control_test.go deleted file mode 100644 index cb2985f8..00000000 --- a/google/resource_storage_object_access_control_test.go +++ /dev/null @@ -1,125 +0,0 @@ -package google - -import ( - "fmt" - "io/ioutil" - "testing" - - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" -) - -func TestAccStorageObjectAccessControl_basic(t *testing.T) { - t.Parallel() - - bucketName := testBucketName() - objectName := testAclObjectName() - objectData := []byte("data data data") - ioutil.WriteFile(tfObjectAcl.Name(), objectData, 0644) - resource.Test(t, resource.TestCase{ - PreCheck: func() { - if errObjectAcl != nil { - panic(errObjectAcl) - } - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccStorageObjectAccessControlDestroy, - Steps: []resource.TestStep{ - { - Config: testGoogleStorageObjectAccessControlBasic(bucketName, objectName, "READER", "allUsers"), - }, - { - ResourceName: "google_storage_object_access_control.default", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccStorageObjectAccessControl_update(t *testing.T) { - t.Parallel() - - bucketName := testBucketName() - objectName := testAclObjectName() - objectData := []byte("data data data") - ioutil.WriteFile(tfObjectAcl.Name(), objectData, 0644) - resource.Test(t, resource.TestCase{ - PreCheck: func() { - if errObjectAcl != nil { - panic(errObjectAcl) - } - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccStorageObjectAccessControlDestroy, - Steps: []resource.TestStep{ - { - Config: testGoogleStorageObjectAccessControlBasic(bucketName, objectName, "READER", "allUsers"), - }, - { - ResourceName: "google_storage_object_access_control.default", - ImportState: true, - ImportStateVerify: true, - }, - { - Config: testGoogleStorageObjectAccessControlBasic(bucketName, objectName, "OWNER", "allUsers"), - }, - { - ResourceName: "google_storage_object_access_control.default", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccStorageObjectAccessControlDestroy(s *terraform.State) error { - config := testAccProvider.Meta().(*Config) - - for _, rs := range s.RootModule().Resources { - if rs.Type != "google_storage_bucket_acl" { - continue - } - - bucket := rs.Primary.Attributes["bucket"] - object := rs.Primary.Attributes["object"] - entity := rs.Primary.Attributes["entity"] - - rePairs, err := config.clientStorage.ObjectAccessControls.List(bucket, object).Do() - if err != nil { - return fmt.Errorf("Can't list role entity acl for object %s in bucket %s", object, bucket) - } - - for _, v := range rePairs.Items { - if v.Entity == entity { - return fmt.Errorf("found entity %s as role entity acl entry for object %s in bucket %s", entity, object, bucket) - } - } - - } - - return nil -} - -func testGoogleStorageObjectAccessControlBasic(bucketName, objectName, role, entity string) string { - return fmt.Sprintf(` -resource "google_storage_bucket" "bucket" { - name = "%s" -} - -resource "google_storage_bucket_object" "object" { - name = "%s" - bucket = "${google_storage_bucket.bucket.name}" - source = "%s" -} - -resource "google_storage_object_access_control" "default" { - object = "${google_storage_bucket_object.object.name}" - bucket = "${google_storage_bucket.bucket.name}" - role = "%s" - entity = "%s" -} -`, bucketName, objectName, tfObjectAcl.Name(), role, entity) -} diff --git a/google/test-fixtures/header-logo.png b/google/test-fixtures/header-logo.png deleted file mode 100644 index 7d65c7a1554ac20ed40231fc67ae5d5a1f46d123..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3368 zcmZ`*c|6qX8vl)yEiuK|_bm=HmN3KEN7n4JXB~`X#xgZhjD3w{i^(BLkv&P0Em_LG z6*ZQM2HBUQ43|3h-1GU|d*9FJ-Ja+9KHK;G<4rU((PL)hW&{9$*+3sht3bT zo!6&{Ijy5@R#PaP+L|CNOrzvthH5jHl!v^Eiq$d){iNkWWd>FYN=f~U5bIwGZ~VFZ znhF&yf`(=tvPKWm_{lAPk&^g^|Fm zhV9jjLKe-DuTGl_wg>w^iR@QT*}OUdFzUi1Mcf{WT<0EwKGn=&0Ho+@zE<|K83!}J zOwzuu8RPH}fyr)sfN;$gQ&0!H=F_*(0j8ccF$MtUIM^Pd%8;n@K*;YkWo?JvlyVs@ zQ46PE)f|^r3+p&npgVr{BP=j|AEKbeozY>KzTpQ`i2D91krq=vc0dW-!x@;K8JHW? z&CHYDV$!*owGeFN1QtYxYX@}mZo(Dz74oFNCFi+6?N-31BBZN;g{dbqtq7CZUD@J5 z`CM?Yv?EwNWq|!^{D7R%j@oUwV!BXY58BY(Q$i0l5D0-ug{111egsX2A&ajR!j0{N z?+xm`cYi()3tP{zIOv_F*TCE?U#$z&l^f=UJHl|Ke+o!$gFQm^KQj$$7w?nLIhQ(R zvO_2DB);&Q{vKyIAQ3w!pwiXK5hEzz%u4?P#Jm&j;&QAUB$Cl675p4Dz#cWGeaRw7 zJSCDW2u*qI<&ZN}E>kfN7*BUibWvCKd)1;d*Qfonj6n2Uw15s3TdRA854G`ToWZ`;E&%L!T)EAEkcl6}z)4fp%DDrG3(>#SVoP8w z)wWMl_h7Ws!FRK7#L*PWo`odErwgi!#=X_PQ%F<7DHVT8>+;~hAlJMwo^LUdU-Q@? z{TAfM$s!l|a(ds^6Kga%rxa!YIL#$Si8ihPr938Fe9w&34k!7fa}4ffQ#Eb)@tZ|J zQjEoUOi`~nK2t)9mOb7O#bEx`e7D5Hiv1C2EN&4sscT?XRATBaO-g!D*f-Sgt$`OM zrSxl7>2cia8PXf`V7?7 zdqP98oLa_0SkY`SPl8Rt&BRrG(ezWVZ#_wPB{G-xMqfhzo&K@=rXI&1GfZT>h>;e@ zNeGD7X9%QCo1bMnmZU0{nr<**Qd;DA4_SOYv+#{=w=5bi&*LHGK|-%|zsMHrUhI+g zxc%C*C;Lr)dXt!{lwO)b+GeKv>x$cDX{sXcV9HR_ton48Tc)>RnHo|=r~OzOlQzvZ zhsdI|GP8;R1J|^qdy5uorGAT^KFr&Um-WGA-X+~u#^%yy$jb2w_=Ed*J<8aMpBR>E zFXW}8xQhMm_F9=(LM_xw$q)Cg=651Hkt;9!H@Uw|<|-G;J9jw6mZet>mkgI}*kwIf ztROvlZds?hoycw9hw{Jm-ms49V>5c5@<%@*e;~g=<6w3#ezE#_Vrb3}?rooK=yo9U z1!iaF$j(bCM%+cDH>4GkBuR`!QPg`H5Z}UgxMiWOT?vIpgqHdQMy}K|fGqgO&H!?EJH0)4jQ}x}f;I8RA)3?(_)1?}& zF5ayE)nj)%W?~DIghpgPR8OtdfIGVT&bF7lna`Jdn}f~sc`>l_l)=xP8 zsZMz=cST`Yu001qTJL+*`=jsmmy?^)o1vQ^CUml9@&$+tq>5u+Cc&XPSc?*c%f6D0 z$yUt1S?}2IKDIPSBh9~)Q#XmbHl6Cj;ZZ+U*}hWN z6x}q~+!p>yYd~nKaJaCbQlF)mW4H?8#;eAw49~y3H|w#Qxqu&DF!c(iSW$}lVGwTU zEVSGXK7a4?%OJ$8aA0vmXCps8>lvo8hWv<}-|+Q$Fxhu9o~!c)Tc=#7FN+aNpyL&;mJU)oI1%<#5gxpykhSsxhHUy~jbHRBwI(9-SFEi;DlmJ9TI>Q zn|Iu!xL$PiZC7b8{n*ofGme=_>-fE) z9auT*MRs3gWUg7RZ09$RRo9kJ&w>r%B90tbIRbo0tOmZWn{G5*dHwd z-gog1*qr7Yl#l-6$I;R!^G`bQ*F&%W;A*DP$Rb{i{gPz;M=0%sC}gB)yQDjzGe=g_ z_Kzr(k#0q9QuoY=n9^w+n8l;P)7m4 z?!B*aC7*4VEx}vuiMnf8*NI8y2A;T}>%pmhqFCd}ov-3O7dq}t;Zmo_*=4uxWT-yt zAQ*+^8|TYb5z98;9@Dr>oS_aj^?81n@}J&7>?$)#GZ`{9vpr_Q?RjszPu#TpaHgKX zF~PAs9XZ)HJybv9Pr2o``)TP@o0C=}$;ex5S8SC4n+|IleY(}k|A~K{-@wkr?(3zd zCe?4@lBUqrinS8&a;qxxMMTZb+SUH>?^I^GbEnvNcdn-q*7k*_b^5GNSQn3tFP1M- z6wMX?)EFW@Dzh$=DWQhu5N(4*m%8Uv;-5b+TGUHk{1_TY?XD5)!U}v>nR@Rs6;NW{ zP%}dd7gAr}pzIXWnk+aDUH!C6-n8U+47*X!^j;4p?!>!fJGDM<(OZ1&Hiy$n^XY)O_tphv zw^g|Q;xU5L^`R;33A4b@eiFc@|=fl-+OD`daUCaF) zjh6^jQ|?oZ6FlS(BODWi7NSARtU6^snGVA;h3pN5@1CW|eF@w@(;!i7I#zIz>bd7o z^y*R&w$=CUSG%2Bz38Pjo0jD81NqFKc^fbAw!Y6+Vz-lPMbt&=ouT1~EyFdRpmVD% zyBbo?JWcA}-nBxBXZ!$9=sw|7dY-R=tugoq8LHUA_CY(dMVLb26_OX zp}|<$;%zS&tGMI*p{^b{H#9WFKj83l3joLvmBXVy8t*C?;_rtIRtZrP{$-(Zcs>%t zgav<@;CfnOVf{M^{P+4JhMnOSAWRQoaiUsQYU+}}5ny@z>AD{w*5eNh* zK>>;j@`A}B5D1v8JWO6*=FmbW_$n6f8X|)Y7WwVu-+oZ&VD}(Q03L(G3Lg1&b;Di8 zs|gDq1^RpZ&J!Ji`A;Nl@Ly#e76?1iz~rE^u>S?aV?6&4>`3z)_N%Vn;gCnpRLn3T zXg@m?#vhFhK1@wrP6_!d%6}>TljlExw*L?K55+%#M|r5224T>LEjnt1x*QVrU$VdK zk+7pK{iAEYDfuNm&GFZ*O;#c!Ci)b3C-oUXR(u jg_AjYNESfHMVit96Ya-#!dax_j^2oYt_iAA+a>B>-**I5 diff --git a/google/transport.go b/google/transport.go index c29b8dad..7b860c7b 100644 --- a/google/transport.go +++ b/google/transport.go @@ -62,12 +62,6 @@ func sendRequest(config *Config, method, rawurl string, body map[string]interfac return nil, err } - // 204 responses will have no body, so we're going to error with "EOF" if we - // try to parse it. Instead, we can just return nil. - if res.StatusCode == 204 { - return nil, nil - } - result := make(map[string]interface{}) if err := json.NewDecoder(res.Body).Decode(&result); err != nil { return nil, err diff --git a/google/transport_test.go b/google/transport_test.go index a367fccc..6a4b5d9f 100644 --- a/google/transport_test.go +++ b/google/transport_test.go @@ -1,53 +1,9 @@ package google import ( - "regexp" - "strings" "testing" - - "github.com/hashicorp/terraform/terraform" ) -// This function isn't a test of transport.go; instead, it is used as an alternative -// to replaceVars inside tests. -func replaceVarsForTest(rs *terraform.ResourceState, linkTmpl string) (string, error) { - re := regexp.MustCompile("{{([[:word:]]+)}}") - var project, region, zone string - - if strings.Contains(linkTmpl, "{{project}}") { - project = rs.Primary.Attributes["project"] - } - - if strings.Contains(linkTmpl, "{{region}}") { - region = rs.Primary.Attributes["region"] - } - - if strings.Contains(linkTmpl, "{{zone}}") { - zone = rs.Primary.Attributes["zone"] - } - - replaceFunc := func(s string) string { - m := re.FindStringSubmatch(s)[1] - if m == "project" { - return project - } - if m == "region" { - return region - } - if m == "zone" { - return zone - } - - if v, ok := rs.Primary.Attributes[m]; ok { - return v - } - - return "" - } - - return re.ReplaceAllStringFunc(linkTmpl, replaceFunc), nil -} - func TestReplaceVars(t *testing.T) { cases := map[string]struct { Template string diff --git a/vendor/google.golang.org/api/appengine/v1/appengine-api.json b/vendor/google.golang.org/api/appengine/v1/appengine-api.json index 5b9476f9..2a282cca 100644 --- a/vendor/google.golang.org/api/appengine/v1/appengine-api.json +++ b/vendor/google.golang.org/api/appengine/v1/appengine-api.json @@ -17,7 +17,7 @@ "basePath": "", "baseUrl": "https://appengine.googleapis.com/", "batchPath": "batch", - "description": "Provisions and manages developers' App Engine applications.", + "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", "icons": { @@ -1115,7 +1115,7 @@ "type": "string" }, "migrateTraffic": { - "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", + "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", "location": "query", "type": "boolean" }, @@ -1572,7 +1572,7 @@ } } }, - "revision": "20181020", + "revision": "20180726", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -1675,7 +1675,7 @@ "type": "string" }, "dispatchRules": { - "description": "HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent. Up to 20 dispatch rules can be supported.", + "description": "HTTP path dispatch rules for requests to the application that do not explicitly target a service or version. Rules are order-dependent. Up to 20 dispatch rules can be supported.@OutputOnly", "items": { "$ref": "UrlDispatchRule" }, @@ -1794,7 +1794,7 @@ "id": "AutomaticScaling", "properties": { "coolDownPeriod": { - "description": "The time period that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. Only applicable in the App Engine flexible environment.", + "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable in the App Engine flexible environment.", "format": "google-duration", "type": "string" }, @@ -2097,10 +2097,6 @@ "description": "Endpoints service configuration ID as specified by the Service Management API. For example \"2016-09-19r1\".By default, the rollout strategy for Endpoints is RolloutStrategy.FIXED. This means that Endpoints starts up with a particular configuration ID. When a new configuration is rolled out, Endpoints must be given the new configuration ID. The config_id field is used to give the configuration ID and is required in this case.Endpoints also has a rollout strategy called RolloutStrategy.MANAGED. When using this, Endpoints fetches the latest configuration and does not need the configuration ID. In this case, config_id must be omitted.", "type": "string" }, - "disableTraceSampling": { - "description": "Enable or disable trace sampling. By default, this is set to false for enabled.", - "type": "boolean" - }, "name": { "description": "Endpoints service name which is the name of the \"service\" resource in the Service Management API. For example \"myapi.endpoints.myproject.cloud.goog\"", "type": "string" @@ -3418,7 +3414,7 @@ "type": "string" }, "defaultExpiration": { - "description": "Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set.", + "description": "Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set.", "format": "google-duration", "type": "string" }, diff --git a/vendor/google.golang.org/api/appengine/v1/appengine-gen.go b/vendor/google.golang.org/api/appengine/v1/appengine-gen.go index 1178f65c..5a6b5cde 100644 --- a/vendor/google.golang.org/api/appengine/v1/appengine-gen.go +++ b/vendor/google.golang.org/api/appengine/v1/appengine-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -348,7 +347,8 @@ type Application struct { // DispatchRules: HTTP path dispatch rules for requests to the // application that do not explicitly target a service or version. Rules - // are order-dependent. Up to 20 dispatch rules can be supported. + // are order-dependent. Up to 20 dispatch rules can be + // supported.@OutputOnly DispatchRules []*UrlDispatchRule `json:"dispatchRules,omitempty"` // FeatureSettings: The feature specific settings to be used in the @@ -537,12 +537,10 @@ func (s *AuthorizedDomain) MarshalJSON() ([]byte, error) { // AutomaticScaling: Automatic scaling is based on request rate, // response latencies, and other application metrics. type AutomaticScaling struct { - // CoolDownPeriod: The time period that the Autoscaler + // CoolDownPeriod: Amount of time that the Autoscaler // (https://cloud.google.com/compute/docs/autoscaler/) should wait - // before it starts collecting information from a new instance. This - // prevents the autoscaler from collecting information when the instance - // is initializing, during which the collected usage would not be - // reliable. Only applicable in the App Engine flexible environment. + // between changes to the number of virtual machines. Only applicable in + // the App Engine flexible environment. CoolDownPeriod string `json:"coolDownPeriod,omitempty"` // CpuUtilization: Target scaling by CPU usage. @@ -1173,10 +1171,6 @@ type EndpointsApiService struct { // configuration ID. In this case, config_id must be omitted. ConfigId string `json:"configId,omitempty"` - // DisableTraceSampling: Enable or disable trace sampling. By default, - // this is set to false for enabled. - DisableTraceSampling bool `json:"disableTraceSampling,omitempty"` - // Name: Endpoints service name which is the name of the "service" // resource in the Service Management API. For example // "myapi.endpoints.myproject.cloud.goog" @@ -3402,7 +3396,7 @@ type Version struct { // proxies and browsers. Only applicable if the corresponding // StaticFilesHandler // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a - // pps.services.versions#StaticFilesHandler) does not specify its own + // pps.services.versions#staticfileshandler) does not specify its own // expiration time.Only returned in GET requests if view=FULL is set. DefaultExpiration string `json:"defaultExpiration,omitempty"` @@ -3734,13 +3728,9 @@ func (c *AppsCreateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -3867,13 +3857,9 @@ func (c *AppsGetCall) 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, "v1/apps/{appsId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -4016,13 +4002,9 @@ func (c *AppsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -4164,13 +4146,9 @@ func (c *AppsRepairCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}:repair") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -4302,13 +4280,9 @@ func (c *AppsAuthorizedCertificatesCreateCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -4435,13 +4409,9 @@ func (c *AppsAuthorizedCertificatesDeleteCall) doRequest(alt string) (*http.Resp reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -4598,13 +4568,9 @@ func (c *AppsAuthorizedCertificatesGetCall) 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, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -4785,13 +4751,9 @@ func (c *AppsAuthorizedCertificatesListCall) 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, "v1/apps/{appsId}/authorizedCertificates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -4978,13 +4940,9 @@ func (c *AppsAuthorizedCertificatesPatchCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -5151,13 +5109,9 @@ func (c *AppsAuthorizedDomainsListCall) 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, "v1/apps/{appsId}/authorizedDomains") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -5336,13 +5290,9 @@ func (c *AppsDomainMappingsCreateCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -5481,13 +5431,9 @@ func (c *AppsDomainMappingsDeleteCall) doRequest(alt string) (*http.Response, er reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -5633,13 +5579,9 @@ func (c *AppsDomainMappingsGetCall) 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, "v1/apps/{appsId}/domainMappings/{domainMappingsId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -5799,13 +5741,9 @@ func (c *AppsDomainMappingsListCall) doRequest(alt string) (*http.Response, erro } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -5981,13 +5919,9 @@ func (c *AppsDomainMappingsPatchCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -6137,13 +6071,9 @@ func (c *AppsFirewallIngressRulesBatchUpdateCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules:batchUpdate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -6275,13 +6205,9 @@ func (c *AppsFirewallIngressRulesCreateCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -6408,13 +6334,9 @@ func (c *AppsFirewallIngressRulesDeleteCall) doRequest(alt string) (*http.Respon reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -6560,13 +6482,9 @@ func (c *AppsFirewallIngressRulesGetCall) 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, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -6735,13 +6653,9 @@ func (c *AppsFirewallIngressRulesListCall) 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, "v1/apps/{appsId}/firewall/ingressRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -6918,13 +6832,9 @@ func (c *AppsFirewallIngressRulesPatchCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -7079,13 +6989,9 @@ func (c *AppsLocationsGetCall) 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, "v1/apps/{appsId}/locations/{locationsId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -7253,13 +7159,9 @@ func (c *AppsLocationsListCall) 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, "v1/apps/{appsId}/locations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -7438,13 +7340,9 @@ func (c *AppsOperationsGetCall) 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, "v1/apps/{appsId}/operations/{operationsId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -7620,13 +7518,9 @@ func (c *AppsOperationsListCall) 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, "v1/apps/{appsId}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -7789,13 +7683,9 @@ func (c *AppsServicesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -7941,13 +7831,9 @@ func (c *AppsServicesGetCall) 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, "v1/apps/{appsId}/services/{servicesId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -8107,13 +7993,9 @@ func (c *AppsServicesListCall) 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, "v1/apps/{appsId}/services") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -8246,11 +8128,11 @@ func (r *AppsServicesService) Patch(appsId string, servicesId string, service *S // traffic migration, the target versions must be located within // instances that are configured for both warmup requests // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a -// pps.services.versions#InboundServiceType) and automatic scaling +// pps.services.versions#inboundservicetype) and automatic scaling // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a -// pps.services.versions#AutomaticScaling). You must specify the shardBy +// pps.services.versions#automaticscaling). You must specify the shardBy // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a -// pps.services#ShardBy) field in the Service resource. Gradual traffic +// pps.services#shardby) field in the Service resource. Gradual traffic // migration is not supported in the App Engine flexible environment. // For examples, see Migrating and Splitting Traffic // (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting @@ -8305,13 +8187,9 @@ func (c *AppsServicesPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -8374,7 +8252,7 @@ func (c *AppsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er // "type": "string" // }, // "migrateTraffic": { - // "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", + // "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", // "location": "query", // "type": "boolean" // }, @@ -8464,13 +8342,9 @@ func (c *AppsServicesVersionsCreateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -8607,13 +8481,9 @@ func (c *AppsServicesVersionsDeleteCall) doRequest(alt string) (*http.Response, reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -8782,13 +8652,9 @@ func (c *AppsServicesVersionsGetCall) 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, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -8978,13 +8844,9 @@ func (c *AppsServicesVersionsListCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -9229,13 +9091,9 @@ func (c *AppsServicesVersionsPatchCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -9401,13 +9259,9 @@ func (c *AppsServicesVersionsInstancesDebugCall) doRequest(alt string) (*http.Re } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -9562,13 +9416,9 @@ func (c *AppsServicesVersionsInstancesDeleteCall) doRequest(alt string) (*http.R reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -9734,13 +9584,9 @@ func (c *AppsServicesVersionsInstancesGetCall) doRequest(alt string) (*http.Resp } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, @@ -9923,13 +9769,9 @@ func (c *AppsServicesVersionsInstancesListCall) 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, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "appsId": c.appsId, diff --git a/vendor/google.golang.org/api/bigquery/v2/bigquery-api.json b/vendor/google.golang.org/api/bigquery/v2/bigquery-api.json index 33f92c7a..8d0dafe6 100644 --- a/vendor/google.golang.org/api/bigquery/v2/bigquery-api.json +++ b/vendor/google.golang.org/api/bigquery/v2/bigquery-api.json @@ -32,7 +32,7 @@ "description": "A data platform for customers to create, manage, share and query data.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/bigquery/", - "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/SZY-9_ScteTEtTSIjMIigLgnbt8\"", + "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/VdW6yLWLV4EG3GBmsDZLc41_FBk\"", "icons": { "x16": "https://www.google.com/images/icons/product/search-16.gif", "x32": "https://www.google.com/images/icons/product/search-32.gif" @@ -998,7 +998,7 @@ } } }, - "revision": "20181012", + "revision": "20180805", "rootUrl": "https://www.googleapis.com/", "schemas": { "BigQueryModelTraining": { @@ -1792,10 +1792,6 @@ "format": "int64", "type": "string" }, - "jobType": { - "description": "[Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN.", - "type": "string" - }, "labels": { "additionalProperties": { "type": "string" @@ -1960,10 +1956,6 @@ "$ref": "TimePartitioning", "description": "Time-based partitioning specification for the destination table." }, - "useAvroLogicalTypes": { - "description": "If sourceFormat is set to \"AVRO\", indicates whether to enable interpreting logical types into their corresponding types (ie. TIMESTAMP), instead of only using their raw types (ie. INTEGER). The default value will be true once this feature launches, but can be set now in preparation.", - "type": "boolean" - }, "writeDisposition": { "description": "[Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_APPEND. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.", "type": "string" @@ -1989,7 +1981,7 @@ }, "defaultDataset": { "$ref": "DatasetReference", - "description": "[Optional] Specifies the default dataset to use for unqualified table names in the query. Note that this does not alter behavior of unqualified dataset names." + "description": "[Optional] Specifies the default dataset to use for unqualified table names in the query." }, "destinationEncryptionConfiguration": { "$ref": "EncryptionConfiguration", @@ -2191,7 +2183,7 @@ "type": "string" }, "location": { - "description": "The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.", + "description": "The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location.", "type": "string" }, "projectId": { @@ -2269,12 +2261,12 @@ "type": "boolean" }, "ddlOperationPerformed": { - "description": "The DDL operation performed, possibly dependent on the pre-existence of the DDL target. Possible values (new values might be added in the future): \"CREATE\": The query created the DDL target. \"SKIP\": No-op. Example cases: the query is CREATE TABLE IF NOT EXISTS while the table already exists, or the query is DROP TABLE IF EXISTS while the table does not exist. \"REPLACE\": The query replaced the DDL target. Example case: the query is CREATE OR REPLACE TABLE, and the table already exists. \"DROP\": The query deleted the DDL target.", + "description": "[Output-only, Beta] The DDL operation performed, possibly dependent on the pre-existence of the DDL target. Possible values (new values might be added in the future): \"CREATE\": The query created the DDL target. \"SKIP\": No-op. Example cases: the query is CREATE TABLE IF NOT EXISTS while the table already exists, or the query is DROP TABLE IF EXISTS while the table does not exist. \"REPLACE\": The query replaced the DDL target. Example case: the query is CREATE OR REPLACE TABLE, and the table already exists. \"DROP\": The query deleted the DDL target.", "type": "string" }, "ddlTargetTable": { "$ref": "TableReference", - "description": "The DDL target table. Present only for CREATE/DROP TABLE/VIEW queries." + "description": "[Output-only, Beta] The DDL target table. Present only for CREATE/DROP TABLE/VIEW queries." }, "estimatedBytesProcessed": { "description": "[Output-only] The original estimate of bytes processed for the job.", @@ -2337,7 +2329,7 @@ "description": "[Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries." }, "statementType": { - "description": "The type of query statement, if valid. Possible values (new values might be added in the future): \"SELECT\": SELECT query. \"INSERT\": INSERT query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language \"UPDATE\": UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language \"DELETE\": DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language \"MERGE\": MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language \"CREATE_TABLE\": CREATE [OR REPLACE] TABLE without AS SELECT. \"CREATE_TABLE_AS_SELECT\": CREATE [OR REPLACE] TABLE ... AS SELECT ... \"DROP_TABLE\": DROP TABLE query. \"CREATE_VIEW\": CREATE [OR REPLACE] VIEW ... AS SELECT ... \"DROP_VIEW\": DROP VIEW query.", + "description": "[Output-only, Beta] The type of query statement, if valid. Possible values (new values might be added in the future): \"SELECT\": SELECT query. \"INSERT\": INSERT query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language \"UPDATE\": UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language \"DELETE\": DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language \"MERGE\": MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language \"CREATE_TABLE\": CREATE [OR REPLACE] TABLE without AS SELECT. \"CREATE_TABLE_AS_SELECT\": CREATE [OR REPLACE] TABLE ... AS SELECT ... \"DROP_TABLE\": DROP TABLE query. \"CREATE_VIEW\": CREATE [OR REPLACE] VIEW ... AS SELECT ... \"DROP_VIEW\": DROP VIEW query.", "type": "string" }, "timeline": { @@ -2368,7 +2360,7 @@ "type": "string" }, "undeclaredQueryParameters": { - "description": "Standard SQL only: list of undeclared query parameters detected during a dry run validation.", + "description": "[Output-only, Beta] Standard SQL only: list of undeclared query parameters detected during a dry run validation.", "items": { "$ref": "QueryParameter" }, @@ -2883,11 +2875,6 @@ "format": "int64", "type": "string" }, - "numPhysicalBytes": { - "description": "[Output-only] [Experimental] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.", - "format": "int64", - "type": "string" - }, "numRows": { "description": "[Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.", "format": "uint64", diff --git a/vendor/google.golang.org/api/bigquery/v2/bigquery-gen.go b/vendor/google.golang.org/api/bigquery/v2/bigquery-gen.go index f0ca5917..d019c028 100644 --- a/vendor/google.golang.org/api/bigquery/v2/bigquery-gen.go +++ b/vendor/google.golang.org/api/bigquery/v2/bigquery-gen.go @@ -16,16 +16,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -1467,10 +1466,6 @@ type JobConfiguration struct { // limit is exceeded, BigQuery may attempt to terminate the job. JobTimeoutMs int64 `json:"jobTimeoutMs,omitempty,string"` - // JobType: [Output-only] The type of the job. Can be QUERY, LOAD, - // EXTRACT, COPY or UNKNOWN. - JobType string `json:"jobType,omitempty"` - // Labels: The labels associated with this job. You can use these to // organize and group your jobs. Label keys and values can be no longer // than 63 characters, can only contain lowercase letters, numeric @@ -1724,13 +1719,6 @@ type JobConfigurationLoad struct { // destination table. TimePartitioning *TimePartitioning `json:"timePartitioning,omitempty"` - // UseAvroLogicalTypes: If sourceFormat is set to "AVRO", indicates - // whether to enable interpreting logical types into their corresponding - // types (ie. TIMESTAMP), instead of only using their raw types (ie. - // INTEGER). The default value will be true once this feature launches, - // but can be set now in preparation. - UseAvroLogicalTypes bool `json:"useAvroLogicalTypes,omitempty"` - // WriteDisposition: [Optional] Specifies the action that occurs if the // destination table already exists. The following values are supported: // WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the @@ -1791,8 +1779,7 @@ type JobConfigurationQuery struct { CreateDisposition string `json:"createDisposition,omitempty"` // DefaultDataset: [Optional] Specifies the default dataset to use for - // unqualified table names in the query. Note that this does not alter - // behavior of unqualified dataset names. + // unqualified table names in the query. DefaultDataset *DatasetReference `json:"defaultDataset,omitempty"` // DestinationEncryptionConfiguration: Custom encryption configuration @@ -2089,8 +2076,9 @@ type JobReference struct { // maximum length is 1,024 characters. JobId string `json:"jobId,omitempty"` - // Location: The geographic location of the job. See details at - // https://cloud.google.com/bigquery/docs/locations#specifying_your_location. + // Location: The geographic location of the job. Required except for US + // and EU. See details at + // https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location. Location string `json:"location,omitempty"` // ProjectId: [Required] The ID of the project containing this job. @@ -2201,19 +2189,19 @@ type JobStatistics2 struct { // query cache. CacheHit bool `json:"cacheHit,omitempty"` - // DdlOperationPerformed: The DDL operation performed, possibly - // dependent on the pre-existence of the DDL target. Possible values - // (new values might be added in the future): "CREATE": The query - // created the DDL target. "SKIP": No-op. Example cases: the query is - // CREATE TABLE IF NOT EXISTS while the table already exists, or the - // query is DROP TABLE IF EXISTS while the table does not exist. + // DdlOperationPerformed: [Output-only, Beta] The DDL operation + // performed, possibly dependent on the pre-existence of the DDL target. + // Possible values (new values might be added in the future): "CREATE": + // The query created the DDL target. "SKIP": No-op. Example cases: the + // query is CREATE TABLE IF NOT EXISTS while the table already exists, + // or the query is DROP TABLE IF EXISTS while the table does not exist. // "REPLACE": The query replaced the DDL target. Example case: the query // is CREATE OR REPLACE TABLE, and the table already exists. "DROP": The // query deleted the DDL target. DdlOperationPerformed string `json:"ddlOperationPerformed,omitempty"` - // DdlTargetTable: The DDL target table. Present only for CREATE/DROP - // TABLE/VIEW queries. + // DdlTargetTable: [Output-only, Beta] The DDL target table. Present + // only for CREATE/DROP TABLE/VIEW queries. DdlTargetTable *TableReference `json:"ddlTargetTable,omitempty"` // EstimatedBytesProcessed: [Output-only] The original estimate of bytes @@ -2253,9 +2241,9 @@ type JobStatistics2 struct { // successful dry run of non-legacy SQL queries. Schema *TableSchema `json:"schema,omitempty"` - // StatementType: The type of query statement, if valid. Possible values - // (new values might be added in the future): "SELECT": SELECT query. - // "INSERT": INSERT query; see + // StatementType: [Output-only, Beta] The type of query statement, if + // valid. Possible values (new values might be added in the future): + // "SELECT": SELECT query. "INSERT": INSERT query; see // https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language "UPDATE": UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language "DELETE": DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language "MERGE": MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language "CREATE_TABLE": CREATE [OR REPLACE] TABLE without AS SELECT. "CREATE_TABLE_AS_SELECT": CREATE [OR REPLACE] TABLE ... AS SELECT ... "DROP_TABLE": DROP TABLE query. "CREATE_VIEW": CREATE [OR REPLACE] VIEW ... AS SELECT ... "DROP_VIEW": DROP VIEW // query. StatementType string `json:"statementType,omitempty"` @@ -2276,8 +2264,9 @@ type JobStatistics2 struct { // TotalSlotMs: [Output-only] Slot-milliseconds for the job. TotalSlotMs int64 `json:"totalSlotMs,omitempty,string"` - // UndeclaredQueryParameters: Standard SQL only: list of undeclared - // query parameters detected during a dry run validation. + // UndeclaredQueryParameters: [Output-only, Beta] Standard SQL only: + // list of undeclared query parameters detected during a dry run + // validation. UndeclaredQueryParameters []*QueryParameter `json:"undeclaredQueryParameters,omitempty"` // ForceSendFields is a list of field names (e.g. "BillingTier") to @@ -3099,11 +3088,6 @@ type Table struct { // are considered "long-term storage". NumLongTermBytes int64 `json:"numLongTermBytes,omitempty,string"` - // NumPhysicalBytes: [Output-only] [Experimental] The physical size of - // this table in bytes, excluding any data in the streaming buffer. This - // includes compression and storage used for time travel. - NumPhysicalBytes int64 `json:"numPhysicalBytes,omitempty,string"` - // NumRows: [Output-only] The number of rows of data in this table, // excluding any data in the streaming buffer. NumRows uint64 `json:"numRows,omitempty,string"` @@ -3957,13 +3941,9 @@ func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { 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/{projectId}/datasets/{datasetId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -4086,13 +4066,9 @@ func (c *DatasetsGetCall) 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/{projectId}/datasets/{datasetId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -4230,13 +4206,9 @@ func (c *DatasetsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/datasets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -4407,13 +4379,9 @@ func (c *DatasetsListCall) 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/{projectId}/datasets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -4590,13 +4558,9 @@ func (c *DatasetsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/datasets/{datasetId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -4740,13 +4704,9 @@ func (c *DatasetsUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/datasets/{datasetId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -4893,13 +4853,9 @@ func (c *JobsCancelCall) doRequest(alt string) (*http.Response, error) { 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/{projectId}/jobs/{jobId}/cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -5061,13 +5017,9 @@ func (c *JobsGetCall) 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/{projectId}/jobs/{jobId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -5258,13 +5210,9 @@ func (c *JobsGetQueryResultsCall) 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/{projectId}/queries/{jobId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -5492,7 +5440,6 @@ func (c *JobsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/jobs") if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) @@ -5505,10 +5452,7 @@ func (c *JobsInsertCall) doRequest(alt string) (*http.Response, error) { body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) defer cleanup() urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders gensupport.SetGetBody(req, getBody) googleapi.Expand(req.URL, map[string]string{ @@ -5748,13 +5692,9 @@ func (c *JobsListCall) 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/{projectId}/jobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -5963,13 +5903,9 @@ func (c *JobsQueryCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/queries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -6110,13 +6046,9 @@ func (c *ProjectsGetServiceAccountCall) 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/{projectId}/serviceAccount") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -6266,13 +6198,9 @@ func (c *ProjectsListCall) 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") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -6427,13 +6355,9 @@ func (c *TabledataInsertAllCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/datasets/{datasetId}/tables/{tableId}/insertAll") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -6623,13 +6547,9 @@ func (c *TabledataListCall) 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/{projectId}/datasets/{datasetId}/tables/{tableId}/data") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -6816,13 +6736,9 @@ func (c *TablesDeleteCall) doRequest(alt string) (*http.Response, error) { 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/{projectId}/datasets/{datasetId}/tables/{tableId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -6960,13 +6876,9 @@ func (c *TablesGetCall) 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/{projectId}/datasets/{datasetId}/tables/{tableId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -7119,13 +7031,9 @@ func (c *TablesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/datasets/{datasetId}/tables") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -7289,13 +7197,9 @@ func (c *TablesListCall) 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/{projectId}/datasets/{datasetId}/tables") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -7472,13 +7376,9 @@ func (c *TablesPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/datasets/{datasetId}/tables/{tableId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -7632,13 +7532,9 @@ func (c *TablesUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{projectId}/datasets/{datasetId}/tables/{tableId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, diff --git a/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-gen.go b/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-gen.go index b358d010..111a1f0e 100644 --- a/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-gen.go +++ b/vendor/google.golang.org/api/cloudbilling/v1/cloudbilling-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -1451,13 +1450,9 @@ func (c *BillingAccountsCreateCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/billingAccounts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -1589,13 +1584,9 @@ func (c *BillingAccountsGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1739,13 +1730,9 @@ func (c *BillingAccountsGetIamPolicyCall) 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, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -1918,13 +1905,9 @@ func (c *BillingAccountsListCall) 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, "v1/billingAccounts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -2095,13 +2078,9 @@ func (c *BillingAccountsPatchCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2248,13 +2227,9 @@ func (c *BillingAccountsSetIamPolicyCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2391,13 +2366,9 @@ func (c *BillingAccountsTestIamPermissionsCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2563,13 +2534,9 @@ func (c *BillingAccountsProjectsListCall) 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, "v1/{+name}/projects") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2744,13 +2711,9 @@ func (c *ProjectsGetBillingInfoCall) doRequest(alt string) (*http.Response, erro } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/billingInfo") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2935,13 +2898,9 @@ func (c *ProjectsUpdateBillingInfoCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/billingInfo") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3096,13 +3055,9 @@ func (c *ServicesListCall) 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, "v1/services") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -3317,13 +3272,9 @@ func (c *ServicesSkusListCall) 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, "v1/{+parent}/skus") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, diff --git a/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json b/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json index 0f0dfc77..70a66f44 100644 --- a/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json +++ b/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json @@ -562,7 +562,7 @@ } } }, - "revision": "20181018", + "revision": "20180828", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ArtifactObjects": { @@ -780,13 +780,6 @@ "format": "int64", "type": "string" }, - "env": { - "description": "A list of global environment variable definitions that will exist for all\nbuild steps in this build. If a variable is defined in both globally and in\na build step, the variable will use the build step value.\n\nThe elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\"\nbeing given the value \"VALUE\".", - "items": { - "type": "string" - }, - "type": "array" - }, "logStreamingOption": { "description": "Option to define build log streaming behavior to Google Cloud\nStorage.", "enum": [ @@ -801,20 +794,6 @@ ], "type": "string" }, - "logging": { - "description": "Option to specify the logging mode, which determines where the logs are\nstored.", - "enum": [ - "LOGGING_UNSPECIFIED", - "LEGACY", - "GCS_ONLY" - ], - "enumDescriptions": [ - "The service determines the logging mode. The default is `LEGACY`. Do not\nrely on the default logging behavior as it may change in the future.", - "Stackdriver logging and Cloud Storage logging are enabled.", - "Only Cloud Storage logging is enabled." - ], - "type": "string" - }, "machineType": { "description": "Compute Engine machine type on which to run the build.", "enum": [ @@ -841,13 +820,6 @@ ], "type": "string" }, - "secretEnv": { - "description": "A list of global environment variables, which are encrypted using a Cloud\nKey Management Service crypto key. These values must be specified in the\nbuild's `Secret`. These variables will be available to all build steps\nin this build.", - "items": { - "type": "string" - }, - "type": "array" - }, "sourceProvenanceHash": { "description": "Requested hash for SourceProvenance.", "enumDescriptions": [ @@ -876,17 +848,6 @@ "Do not fail the build if error in substitutions checks." ], "type": "string" - }, - "volumes": { - "description": "Global list of volumes to mount for ALL build steps\n\nEach volume is created as an empty volume prior to starting the build\nprocess. Upon completion of the build, volumes and their contents are\ndiscarded. Global volume names and paths cannot conflict with the volumes\ndefined a build step.\n\nUsing a global volume in a build with only one step is not valid as\nit is indicative of a build request with an incorrect configuration.", - "items": { - "$ref": "Volume" - }, - "type": "array" - }, - "workerPool": { - "description": "Option to specify a `WorkerPool` for the build. User specifies the pool\nwith the format \"[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]\".\nThis is an experimental field.", - "type": "string" } }, "type": "object" @@ -925,10 +886,6 @@ "description": "Required. The name of the container image that will run this particular\nbuild step.\n\nIf the image is available in the host's Docker daemon's cache, it\nwill be run directly. If not, the host will attempt to pull the image\nfirst, using the builder service account's credentials if necessary.\n\nThe Docker daemon's cache will already have the latest versions of all of\nthe officially supported build steps\n([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).\nThe Docker daemon will also have cached many of the layers for some popular\nimages, like \"ubuntu\", \"debian\", but they will be refreshed at the time you\nattempt to use them.\n\nIf you built an image in a previous build step, it will be stored in the\nhost's Docker daemon's cache and is available to use as the name for a\nlater build step.", "type": "string" }, - "pullTiming": { - "$ref": "TimeSpan", - "description": "Output only. Stores timing information for pulling this build step's\nbuilder image only." - }, "secretEnv": { "description": "A list of environment variables which are encrypted using a Cloud Key\nManagement Service crypto key. These values must be specified in the\nbuild's `Secret`.", "items": { @@ -970,7 +927,7 @@ "description": "Output only. Stores timing information for executing this build step." }, "volumes": { - "description": "List of volumes to mount into the build step.\n\nEach volume is created as an empty volume prior to execution of the\nbuild step. Upon completion of the build, volumes and their contents are\ndiscarded.\n\nUsing a named volume in only one step is not valid as it is indicative\nof a build request with an incorrect configuration.", + "description": "List of volumes to mount into the build step.\n\nEach volume will be created as an empty volume prior to execution of the\nbuild step. Upon completion of the build, volumes and their contents will\nbe discarded.\n\nUsing a named volume in only one step is not valid as it is indicative\nof a mis-configured build request.", "items": { "$ref": "Volume" }, @@ -1293,7 +1250,7 @@ "format": "byte", "type": "string" }, - "description": "Map of environment variable name to its encrypted value.\n\nSecret environment variables must be unique across all of a build's\nsecrets, and must be used by at least one build step. Values can be at most\n64 KB in size. There can be at most 100 secret values across all of a\nbuild's secrets.", + "description": "Map of environment variable name to its encrypted value.\n\nSecret environment variables must be unique across all of a build's\nsecrets, and must be used by at least one build step. Values can be at most\n1 KB in size. There can be at most ten secret values across all of a\nbuild's secrets.", "type": "object" } }, diff --git a/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-gen.go b/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-gen.go index da26e384..e1754420 100644 --- a/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-gen.go +++ b/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -479,17 +478,6 @@ type BuildOptions struct { // more than the maximum are rejected with an error. DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // Env: A list of global environment variable definitions that will - // exist for all - // build steps in this build. If a variable is defined in both globally - // and in - // a build step, the variable will use the build step value. - // - // The elements are of the form "KEY=VALUE" for the environment variable - // "KEY" - // being given the value "VALUE". - Env []string `json:"env,omitempty"` - // LogStreamingOption: Option to define build log streaming behavior to // Google Cloud // Storage. @@ -504,19 +492,6 @@ type BuildOptions struct { // written when the build is completed. LogStreamingOption string `json:"logStreamingOption,omitempty"` - // Logging: Option to specify the logging mode, which determines where - // the logs are - // stored. - // - // Possible values: - // "LOGGING_UNSPECIFIED" - The service determines the logging mode. - // The default is `LEGACY`. Do not - // rely on the default logging behavior as it may change in the future. - // "LEGACY" - Stackdriver logging and Cloud Storage logging are - // enabled. - // "GCS_ONLY" - Only Cloud Storage logging is enabled. - Logging string `json:"logging,omitempty"` - // MachineType: Compute Engine machine type on which to run the build. // // Possible values: @@ -532,15 +507,6 @@ type BuildOptions struct { // "VERIFIED" - Verified build. RequestedVerifyOption string `json:"requestedVerifyOption,omitempty"` - // SecretEnv: A list of global environment variables, which are - // encrypted using a Cloud - // Key Management Service crypto key. These values must be specified in - // the - // build's `Secret`. These variables will be available to all build - // steps - // in this build. - SecretEnv []string `json:"secretEnv,omitempty"` - // SourceProvenanceHash: Requested hash for SourceProvenance. // // Possible values: @@ -561,27 +527,6 @@ type BuildOptions struct { // checks. SubstitutionOption string `json:"substitutionOption,omitempty"` - // Volumes: Global list of volumes to mount for ALL build steps - // - // Each volume is created as an empty volume prior to starting the - // build - // process. Upon completion of the build, volumes and their contents - // are - // discarded. Global volume names and paths cannot conflict with the - // volumes - // defined a build step. - // - // Using a global volume in a build with only one step is not valid - // as - // it is indicative of a build request with an incorrect configuration. - Volumes []*Volume `json:"volumes,omitempty"` - - // WorkerPool: Option to specify a `WorkerPool` for the build. User - // specifies the pool - // with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]". - // This is an experimental field. - WorkerPool string `json:"workerPool,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskSizeGb") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -685,11 +630,6 @@ type BuildStep struct { // later build step. Name string `json:"name,omitempty"` - // PullTiming: Output only. Stores timing information for pulling this - // build step's - // builder image only. - PullTiming *TimeSpan `json:"pullTiming,omitempty"` - // SecretEnv: A list of environment variables which are encrypted using // a Cloud Key // Management Service crypto key. These values must be specified in @@ -727,15 +667,15 @@ type BuildStep struct { // Volumes: List of volumes to mount into the build step. // - // Each volume is created as an empty volume prior to execution of + // Each volume will be created as an empty volume prior to execution of // the // build step. Upon completion of the build, volumes and their contents - // are - // discarded. + // will + // be discarded. // // Using a named volume in only one step is not valid as it is // indicative - // of a build request with an incorrect configuration. + // of a mis-configured build request. Volumes []*Volume `json:"volumes,omitempty"` // WaitFor: The ID(s) of the step(s) that this build step depends @@ -1301,7 +1241,7 @@ type Secret struct { // build's // secrets, and must be used by at least one build step. Values can be // at most - // 64 KB in size. There can be at most 100 secret values across all of + // 1 KB in size. There can be at most ten secret values across all of // a // build's secrets. SecretEnv map[string]string `json:"secretEnv,omitempty"` @@ -1729,13 +1669,9 @@ func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1879,13 +1815,9 @@ func (c *OperationsGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2059,13 +1991,9 @@ func (c *OperationsListCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2234,13 +2162,9 @@ func (c *ProjectsBuildsCancelCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds/{id}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -2386,13 +2310,9 @@ func (c *ProjectsBuildsCreateCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -2537,13 +2457,9 @@ func (c *ProjectsBuildsGetCall) 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, "v1/projects/{projectId}/builds/{id}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -2712,13 +2628,9 @@ func (c *ProjectsBuildsListCall) 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, "v1/projects/{projectId}/builds") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -2923,13 +2835,9 @@ func (c *ProjectsBuildsRetryCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds/{id}:retry") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -3071,13 +2979,9 @@ func (c *ProjectsTriggersCreateCall) 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, "v1/projects/{projectId}/triggers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -3207,13 +3111,9 @@ func (c *ProjectsTriggersDeleteCall) doRequest(alt string) (*http.Response, erro reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -3361,13 +3261,9 @@ func (c *ProjectsTriggersGetCall) 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, "v1/projects/{projectId}/triggers/{triggerId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -3513,13 +3409,9 @@ func (c *ProjectsTriggersListCall) 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, "v1/projects/{projectId}/triggers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -3653,13 +3545,9 @@ func (c *ProjectsTriggersPatchCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -3801,13 +3689,9 @@ func (c *ProjectsTriggersRunCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}:run") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, diff --git a/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-api.json b/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-api.json index 095880c6..6607ae9b 100644 --- a/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-api.json +++ b/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-api.json @@ -381,31 +381,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:getIamPolicy", - "httpMethod": "GET", - "id": "cloudfunctions.projects.locations.functions.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "list": { "description": "Returns a list of functions that belong to the requested project.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions", @@ -475,62 +450,6 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:setIamPolicy", - "httpMethod": "POST", - "id": "cloudfunctions.projects.locations.functions.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:testIamPermissions", - "httpMethod": "POST", - "id": "cloudfunctions.projects.locations.functions.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } } } @@ -539,79 +458,9 @@ } } }, - "revision": "20181018", + "revision": "20180702", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { - "AuditConfig": { - "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", - "id": "AuditConfig", - "properties": { - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.", - "items": { - "$ref": "AuditLogConfig" - }, - "type": "array" - }, - "service": { - "description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.", - "type": "string" - } - }, - "type": "object" - }, - "AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", - "id": "AuditLogConfig", - "properties": { - "exemptedMembers": { - "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", - "items": { - "type": "string" - }, - "type": "array" - }, - "logType": { - "description": "The log type that this config enables.", - "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" - ], - "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" - ], - "type": "string" - } - }, - "type": "object" - }, - "Binding": { - "description": "Associates `members` with a `role`.", - "id": "Binding", - "properties": { - "condition": { - "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." - }, - "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", - "items": { - "type": "string" - }, - "type": "array" - }, - "role": { - "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.", - "type": "string" - } - }, - "type": "object" - }, "CallFunctionRequest": { "description": "Request for the `CallFunction` method.", "id": "CallFunctionRequest", @@ -643,7 +492,7 @@ "type": "object" }, "CloudFunction": { - "description": "Describes a Cloud Function that contains user computation executed in\nresponse to an event. It encapsulate function and triggers configurations.\nLINT.IfChange", + "description": "Describes a Cloud Function that contains user computation executed in\nresponse to an event. It encapsulate function and triggers configurations.", "id": "CloudFunction", "properties": { "availableMemoryMb": { @@ -691,7 +540,7 @@ "type": "string" }, "network": { - "description": "The VPC Network that this cloud function can connect to. It can be\neither the fully-qualified URI, or the short name of the network resource.\nIf the short network name is used, the network must belong to the same\nproject. Otherwise, it must belong to a project within the same\norganization. The format of this field is either\n`projects/{project}/global/networks/{network}` or `{network}`, where\n{project} is a project id where the network is defined, and {network} is\nthe short name of the network.\n\nThis field is mutually exclusive with `vpc_connector` and will be replaced\nby it.\n\nSee [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for\nmore information on connecting Cloud projects.\n\nThis feature is currently in alpha, available only for whitelisted users.", + "description": "The VPC Network that this cloud function can connect to. It can be\neither the fully-qualified URI, or the short name of the network resource.\nIf the short network name is used, the network must belong to the same\nproject. Otherwise, it must belong to a project within the same\norganization. The format of this field is either\n`projects/{project}/global/networks/{network}` or `{network}`, where\n{project} is a project id where the network is defined, and {network} is\nthe short name of the network.\n\nSee [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for\nmore information on connecting Cloud projects.\n\nThis feature is currently in alpha, available only for whitelisted users.", "type": "string" }, "runtime": { @@ -748,10 +597,6 @@ "description": "Output only.\nThe version identifier of the Cloud Function. Each deployment attempt\nresults in a new version of a function being created.", "format": "int64", "type": "string" - }, - "vpcConnector": { - "description": "The VPC Network Connector that this cloud function can connect to. It can\nbe either the fully-qualified URI, or the short name of the network\nconnector resource. The format of this field is\n`projects/*/locations/*/connectors/*`\n\nThis field is mutually exclusive with `network` field and will eventually\nreplace it.\n\nSee [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for\nmore information on connecting Cloud projects.\n\nThis feature is currently in alpha, available only for whitelisted users.", - "type": "string" } }, "type": "object" @@ -779,29 +624,6 @@ }, "type": "object" }, - "Expr": { - "description": "Represents an expression text. Example:\n\n title: \"User account presence\"\n description: \"Determines whether the request has a user account\"\n expression: \"size(request.user) \u003e 0\"", - "id": "Expr", - "properties": { - "description": { - "description": "An optional description of the expression. This is a longer text which\ndescribes the expression, e.g. when hovered over it in a UI.", - "type": "string" - }, - "expression": { - "description": "Textual representation of an expression in\nCommon Expression Language syntax.\n\nThe application context of the containing message determines which\nwell-known feature set of CEL is supported.", - "type": "string" - }, - "location": { - "description": "An optional string indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.", - "type": "string" - }, - "title": { - "description": "An optional title for the expression, i.e. a short string describing\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.", - "type": "string" - } - }, - "type": "object" - }, "FailurePolicy": { "description": "Describes the policy in case of function's execution failure.\nIf empty, then defaults to ignoring failures (i.e. not retrying them).", "id": "FailurePolicy", @@ -1077,59 +899,12 @@ }, "type": "object" }, - "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**JSON Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\"\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\n**YAML Example**\n\n bindings:\n - members:\n - user:mike@example.com\n - group:admins@example.com\n - domain:google.com\n - serviceAccount:my-other-app@appspot.gserviceaccount.com\n role: roles/owner\n - members:\n - user:sean@example.com\n role: roles/viewer\n\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam/docs).", - "id": "Policy", - "properties": { - "auditConfigs": { - "description": "Specifies cloud audit logging configuration for this policy.", - "items": { - "$ref": "AuditConfig" - }, - "type": "array" - }, - "bindings": { - "description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", - "format": "byte", - "type": "string" - }, - "version": { - "description": "Deprecated.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "Retry": { "description": "Describes the retry policy in case of function's execution failure.\nA function execution will be retried on any failure.\nA failed execution will be retried up to 7 days with an exponential backoff\n(capped at 10 seconds).\nRetried execution is charged as any other execution.", "id": "Retry", "properties": {}, "type": "object" }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "id": "SetIamPolicyRequest", - "properties": { - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." - }, - "updateMask": { - "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", - "format": "google-fieldmask", - "type": "string" - } - }, - "type": "object" - }, "SourceRepository": { "description": "Describes SourceRepository, used to represent parameters related to\nsource repository where a function is hosted.", "id": "SourceRepository", @@ -1171,34 +946,6 @@ } }, "type": "object" - }, - "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "id": "TestIamPermissionsRequest", - "properties": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "id": "TestIamPermissionsResponse", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" } }, "servicePath": "", diff --git a/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-gen.go b/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-gen.go index dd5b195e..9b546a68 100644 --- a/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-gen.go +++ b/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -121,233 +120,6 @@ type ProjectsLocationsFunctionsService struct { s *Service } -// AuditConfig: Specifies the audit configuration for a service. -// The configuration determines which permission types are logged, and -// what -// identities, if any, are exempted from logging. -// An AuditConfig must have one or more AuditLogConfigs. -// -// If there are AuditConfigs for both `allServices` and a specific -// service, -// the union of the two AuditConfigs is used for that service: the -// log_types -// specified in each AuditConfig are enabled, and the exempted_members -// in each -// AuditLogConfig are exempted. -// -// Example Policy with multiple AuditConfigs: -// -// { -// "audit_configs": [ -// { -// "service": "allServices" -// "audit_log_configs": [ -// { -// "log_type": "DATA_READ", -// "exempted_members": [ -// "user:foo@gmail.com" -// ] -// }, -// { -// "log_type": "DATA_WRITE", -// }, -// { -// "log_type": "ADMIN_READ", -// } -// ] -// }, -// { -// "service": "fooservice.googleapis.com" -// "audit_log_configs": [ -// { -// "log_type": "DATA_READ", -// }, -// { -// "log_type": "DATA_WRITE", -// "exempted_members": [ -// "user:bar@gmail.com" -// ] -// } -// ] -// } -// ] -// } -// -// For fooservice, this policy enables DATA_READ, DATA_WRITE and -// ADMIN_READ -// logging. It also exempts foo@gmail.com from DATA_READ logging, -// and -// bar@gmail.com from DATA_WRITE logging. -type AuditConfig struct { - // AuditLogConfigs: The configuration for logging of each type of - // permission. - AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` - - // Service: Specifies a service that will be enabled for audit - // logging. - // For example, `storage.googleapis.com`, - // `cloudsql.googleapis.com`. - // `allServices` is a special value that covers all services. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AuditLogConfigs") 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 *AuditConfig) MarshalJSON() ([]byte, error) { - type NoMethod AuditConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AuditLogConfig: Provides the configuration for logging a type of -// permissions. -// Example: -// -// { -// "audit_log_configs": [ -// { -// "log_type": "DATA_READ", -// "exempted_members": [ -// "user:foo@gmail.com" -// ] -// }, -// { -// "log_type": "DATA_WRITE", -// } -// ] -// } -// -// This enables 'DATA_READ' and 'DATA_WRITE' logging, while -// exempting -// foo@gmail.com from DATA_READ logging. -type AuditLogConfig struct { - // ExemptedMembers: Specifies the identities that do not cause logging - // for this type of - // permission. - // Follows the same format of Binding.members. - ExemptedMembers []string `json:"exemptedMembers,omitempty"` - - // LogType: The log type that this config enables. - // - // Possible values: - // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. - // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy - // "DATA_WRITE" - Data writes. Example: CloudSQL Users create - // "DATA_READ" - Data reads. Example: CloudSQL Users list - LogType string `json:"logType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExemptedMembers") 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 *AuditLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod AuditLogConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Binding: Associates `members` with a `role`. -type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. - // NOTE: an unsatisfied condition will not allow user access via - // current - // binding. Different bindings, including their conditions, are - // examined - // independently. - Condition *Expr `json:"condition,omitempty"` - - // Members: Specifies the identities requesting access for a Cloud - // Platform resource. - // `members` can have the following values: - // - // * `allUsers`: A special identifier that represents anyone who is - // on the internet; with or without a Google account. - // - // * `allAuthenticatedUsers`: A special identifier that represents - // anyone - // who is authenticated with a Google account or a service - // account. - // - // * `user:{emailid}`: An email address that represents a specific - // Google - // account. For example, `alice@gmail.com` . - // - // - // * `serviceAccount:{emailid}`: An email address that represents a - // service - // account. For example, - // `my-other-app@appspot.gserviceaccount.com`. - // - // * `group:{emailid}`: An email address that represents a Google - // group. - // For example, `admins@example.com`. - // - // - // * `domain:{domain}`: A Google Apps domain name that represents all - // the - // users of that domain. For example, `google.com` or - // `example.com`. - // - // - Members []string `json:"members,omitempty"` - - // Role: Role that is assigned to `members`. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - Role string `json:"role,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Condition") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Condition") 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 *Binding) MarshalJSON() ([]byte, error) { - type NoMethod Binding - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // CallFunctionRequest: Request for the `CallFunction` method. type CallFunctionRequest struct { // Data: Input to be passed to the function. @@ -423,7 +195,6 @@ func (s *CallFunctionResponse) MarshalJSON() ([]byte, error) { // computation executed in // response to an event. It encapsulate function and triggers // configurations. -// LINT.IfChange type CloudFunction struct { // AvailableMemoryMb: The amount of memory in MB available for a // function. @@ -490,10 +261,6 @@ type CloudFunction struct { // is // the short name of the network. // - // This field is mutually exclusive with `vpc_connector` and will be - // replaced - // by it. - // // See [the VPC // documentation](https://cloud.google.com/compute/docs/vpc) for // more information on connecting Cloud projects. @@ -558,26 +325,6 @@ type CloudFunction struct { // results in a new version of a function being created. VersionId int64 `json:"versionId,omitempty,string"` - // VpcConnector: The VPC Network Connector that this cloud function can - // connect to. It can - // be either the fully-qualified URI, or the short name of the - // network - // connector resource. The format of this field - // is - // `projects/*/locations/*/connectors/*` - // - // This field is mutually exclusive with `network` field and will - // eventually - // replace it. - // - // See [the VPC - // documentation](https://cloud.google.com/compute/docs/vpc) for - // more information on connecting Cloud projects. - // - // This feature is currently in alpha, available only for whitelisted - // users. - VpcConnector string `json:"vpcConnector,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -692,60 +439,6 @@ func (s *EventTrigger) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Expr: Represents an expression text. Example: -// -// title: "User account presence" -// description: "Determines whether the request has a user account" -// expression: "size(request.user) > 0" -type Expr struct { - // Description: An optional description of the expression. This is a - // longer text which - // describes the expression, e.g. when hovered over it in a UI. - Description string `json:"description,omitempty"` - - // Expression: Textual representation of an expression in - // Common Expression Language syntax. - // - // The application context of the containing message determines - // which - // well-known feature set of CEL is supported. - Expression string `json:"expression,omitempty"` - - // Location: An optional string indicating the location of the - // expression for error - // reporting, e.g. a file name and a position in the file. - Location string `json:"location,omitempty"` - - // Title: An optional title for the expression, i.e. a short string - // describing - // its purpose. This can be used e.g. in UIs which allow to enter - // the - // expression. - Title string `json:"title,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Expr) MarshalJSON() ([]byte, error) { - type NoMethod Expr - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // FailurePolicy: Describes the policy in case of function's execution // failure. // If empty, then defaults to ignoring failures (i.e. not retrying @@ -1252,115 +945,6 @@ func (s *OperationMetadataV1Beta2) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Policy: Defines an Identity and Access Management (IAM) policy. It is -// used to -// specify access control policies for Cloud Platform resources. -// -// -// A `Policy` consists of a list of `bindings`. A `binding` binds a list -// of -// `members` to a `role`, where the members can be user accounts, Google -// groups, -// Google domains, and service accounts. A `role` is a named list of -// permissions -// defined by IAM. -// -// **JSON Example** -// -// { -// "bindings": [ -// { -// "role": "roles/owner", -// "members": [ -// "user:mike@example.com", -// "group:admins@example.com", -// "domain:google.com", -// -// "serviceAccount:my-other-app@appspot.gserviceaccount.com" -// ] -// }, -// { -// "role": "roles/viewer", -// "members": ["user:sean@example.com"] -// } -// ] -// } -// -// **YAML Example** -// -// bindings: -// - members: -// - user:mike@example.com -// - group:admins@example.com -// - domain:google.com -// - serviceAccount:my-other-app@appspot.gserviceaccount.com -// role: roles/owner -// - members: -// - user:sean@example.com -// role: roles/viewer -// -// -// For a description of IAM and its features, see the -// [IAM developer's guide](https://cloud.google.com/iam/docs). -type Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this - // policy. - AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` - - // Bindings: Associates a list of `members` to a `role`. - // `bindings` with no members will result in an error. - Bindings []*Binding `json:"bindings,omitempty"` - - // Etag: `etag` is used for optimistic concurrency control as a way to - // help - // prevent simultaneous updates of a policy from overwriting each - // other. - // It is strongly suggested that systems make use of the `etag` in - // the - // read-modify-write cycle to perform policy updates in order to avoid - // race - // conditions: An `etag` is returned in the response to `getIamPolicy`, - // and - // systems are expected to put that etag in the request to - // `setIamPolicy` to - // ensure that their change will be applied to the same version of the - // policy. - // - // If no `etag` is provided in the call to `setIamPolicy`, then the - // existing - // policy is overwritten blindly. - Etag string `json:"etag,omitempty"` - - // Version: Deprecated. - Version int64 `json:"version,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AuditConfigs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Policy) MarshalJSON() ([]byte, error) { - type NoMethod Policy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Retry: Describes the retry policy in case of function's execution // failure. // A function execution will be retried on any failure. @@ -1371,48 +955,6 @@ func (s *Policy) MarshalJSON() ([]byte, error) { type Retry struct { } -// SetIamPolicyRequest: Request message for `SetIamPolicy` method. -type SetIamPolicyRequest struct { - // 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 a - // valid policy but certain Cloud Platform services (such as - // Projects) - // might reject them. - Policy *Policy `json:"policy,omitempty"` - - // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the - // policy to modify. Only - // the fields in the mask will be modified. If no mask is provided, - // the - // following default mask is used: - // paths: "bindings, etag" - // This field is only used by Cloud IAM. - UpdateMask string `json:"updateMask,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Policy") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Policy") 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 *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetIamPolicyRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // SourceRepository: Describes SourceRepository, used to represent // parameters related to // source repository where a function is hosted. @@ -1589,76 +1131,6 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TestIamPermissionsRequest: Request message for `TestIamPermissions` -// method. -type TestIamPermissionsRequest struct { - // Permissions: The set of permissions to check for the `resource`. - // Permissions with - // wildcards (such as '*' or 'storage.*') are not allowed. For - // more - // information see - // [IAM - // Overview](https://cloud.google.com/iam/docs/overview#permissions). - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") 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 *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TestIamPermissionsResponse: Response message for `TestIamPermissions` -// method. -type TestIamPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that - // the caller is - // allowed. - Permissions []string `json:"permissions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") 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 *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // method id "cloudfunctions.operations.get": type OperationsGetCall struct { @@ -1727,13 +1199,9 @@ func (c *OperationsGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1912,13 +1380,9 @@ func (c *OperationsListCall) 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, "v1/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -2107,13 +1571,9 @@ func (c *ProjectsLocationsListCall) 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, "v1/{+name}/locations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2282,13 +1742,9 @@ func (c *ProjectsLocationsFunctionsCallCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:call") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2425,13 +1881,9 @@ func (c *ProjectsLocationsFunctionsCreateCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}/functions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "location": c.location, @@ -2561,13 +2013,9 @@ func (c *ProjectsLocationsFunctionsDeleteCall) doRequest(alt string) (*http.Resp reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2704,13 +2152,9 @@ func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) doRequest(alt string } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateDownloadUrl") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2864,13 +2308,9 @@ func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) doRequest(alt string) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/functions:generateUploadUrl") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -3011,13 +2451,9 @@ func (c *ProjectsLocationsFunctionsGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3090,152 +2526,6 @@ func (c *ProjectsLocationsFunctionsGetCall) Do(opts ...googleapi.CallOption) (*C } -// method id "cloudfunctions.projects.locations.functions.getIamPolicy": - -type ProjectsLocationsFunctionsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. -// Returns an empty policy if the resource exists and does not have a -// policy -// set. -func (r *ProjectsLocationsFunctionsService) GetIamPolicy(resource string) *ProjectsLocationsFunctionsGetIamPolicyCall { - c := &ProjectsLocationsFunctionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - 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 *ProjectsLocationsFunctionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGetIamPolicyCall { - 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 *ProjectsLocationsFunctionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsFunctionsGetIamPolicyCall { - 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 *ProjectsLocationsFunctionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGetIamPolicyCall { - 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 *ProjectsLocationsFunctionsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsFunctionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudfunctions.projects.locations.functions.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 *ProjectsLocationsFunctionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "cloudfunctions.projects.locations.functions.getIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "cloudfunctions.projects.locations.functions.list": type ProjectsLocationsFunctionsListCall struct { @@ -3319,13 +2609,9 @@ func (c *ProjectsLocationsFunctionsListCall) 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, "v1/{+parent}/functions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -3494,13 +2780,9 @@ func (c *ProjectsLocationsFunctionsPatchCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3581,293 +2863,3 @@ func (c *ProjectsLocationsFunctionsPatchCall) Do(opts ...googleapi.CallOption) ( // } } - -// method id "cloudfunctions.projects.locations.functions.setIamPolicy": - -type ProjectsLocationsFunctionsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any -// existing policy. -func (r *ProjectsLocationsFunctionsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsFunctionsSetIamPolicyCall { - c := &ProjectsLocationsFunctionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsFunctionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsSetIamPolicyCall { - 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 *ProjectsLocationsFunctionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFunctionsSetIamPolicyCall { - 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 *ProjectsLocationsFunctionsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsFunctionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudfunctions.projects.locations.functions.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 *ProjectsLocationsFunctionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "cloudfunctions.projects.locations.functions.setIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudfunctions.projects.locations.functions.testIamPermissions": - -type ProjectsLocationsFunctionsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -// If the resource does not exist, this will return an empty set -// of -// permissions, not a NOT_FOUND error. -// -// Note: This operation is designed to be used for building -// permission-aware -// UIs and command-line tools, not for authorization checking. This -// operation -// may "fail open" without warning. -func (r *ProjectsLocationsFunctionsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsFunctionsTestIamPermissionsCall { - c := &ProjectsLocationsFunctionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsFunctionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsTestIamPermissionsCall { - 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 *ProjectsLocationsFunctionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFunctionsTestIamPermissionsCall { - 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 *ProjectsLocationsFunctionsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsFunctionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudfunctions.projects.locations.functions.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsFunctionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "cloudfunctions.projects.locations.functions.testIamPermissions", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, - // "response": { - // "$ref": "TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} diff --git a/vendor/google.golang.org/api/cloudiot/v1/cloudiot-api.json b/vendor/google.golang.org/api/cloudiot/v1/cloudiot-api.json index c8ff97c4..8db5b2ca 100644 --- a/vendor/google.golang.org/api/cloudiot/v1/cloudiot-api.json +++ b/vendor/google.golang.org/api/cloudiot/v1/cloudiot-api.json @@ -233,13 +233,13 @@ ], "parameters": { "pageSize": { - "description": "The maximum number of registries to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested. A non-empty `next_page_token` in the response\nindicates that more data is available.", + "description": "The maximum number of registries to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested, but if there is a non-empty `page_token`, it\nindicates that more entries are available.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The value returned by the last `ListDeviceRegistriesResponse`; indicates\nthat this is a continuation of a prior `ListDeviceRegistries` call and\nthe system should return the next page of data.", + "description": "The value returned by the last `ListDeviceRegistriesResponse`; indicates\nthat this is a continuation of a prior `ListDeviceRegistries` call, and\nthat the system should return the next page of data.", "location": "query", "type": "string" }, @@ -454,32 +454,32 @@ ], "parameters": { "deviceIds": { - "description": "A list of device string IDs. For example, `['device0', 'device12']`.\nIf empty, this field is ignored. Maximum IDs: 10,000", + "description": "A list of device string identifiers. If empty, it will ignore this field.\nFor example, `['device0', 'device12']`. This field cannot hold more than\n10,000 entries.", "location": "query", "repeated": true, "type": "string" }, "deviceNumIds": { - "description": "A list of device numeric IDs. If empty, this field is ignored. Maximum\nIDs: 10,000.", + "description": "A list of device numerical ids. If empty, it will ignore this field. This\nfield cannot hold more than 10,000 entries.", "format": "uint64", "location": "query", "repeated": true, "type": "string" }, "fieldMask": { - "description": "The fields of the `Device` resource to be returned in the response. The\nfields `id` and `num_id` are always returned, along with any\nother fields specified.", + "description": "The fields of the `Device` resource to be returned in the response. The\nfields `id`, and `num_id` are always returned by default, along with any\nother fields specified.", "format": "google-fieldmask", "location": "query", "type": "string" }, "pageSize": { - "description": "The maximum number of devices to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested. A non-empty `next_page_token` in the response\nindicates that more data is available.", + "description": "The maximum number of devices to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested, but if there is a non-empty `page_token`, it\nindicates that more entries are available.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The value returned by the last `ListDevicesResponse`; indicates\nthat this is a continuation of a prior `ListDevices` call and\nthe system should return the next page of data.", + "description": "The value returned by the last `ListDevicesResponse`; indicates\nthat this is a continuation of a prior `ListDevices` call, and\nthat the system should return the next page of data.", "location": "query", "type": "string" }, @@ -563,35 +563,6 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloudiot" ] - }, - "sendCommandToDevice": { - "description": "Sends a command to the specified device. In order for a device to be able\nto receive commands, it must:\n1) be connected to Cloud IoT Core using the MQTT protocol, and\n2) be subscribed to the group of MQTT topics specified by\n /devices/{device-id}/commands/#. This subscription will receive commands\n at the top-level topic /devices/{device-id}/commands as well as commands\n for subfolders, like /devices/{device-id}/commands/subfolder.\n Note that subscribing to specific subfolders is not supported.\nIf the command could not be delivered to the device, this method will\nreturn an error; in particular, if the device is not subscribed, this\nmethod will return FAILED_PRECONDITION. Otherwise, this method will\nreturn OK. If the subscription is QoS 1, at least once delivery will be\nguaranteed; for QoS 0, no acknowledgment will be expected from the device.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}:sendCommandToDevice", - "httpMethod": "POST", - "id": "cloudiot.projects.locations.registries.devices.sendCommandToDevice", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:sendCommandToDevice", - "request": { - "$ref": "SendCommandToDeviceRequest" - }, - "response": { - "$ref": "SendCommandToDeviceResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudiot" - ] } }, "resources": { @@ -804,32 +775,32 @@ ], "parameters": { "deviceIds": { - "description": "A list of device string IDs. For example, `['device0', 'device12']`.\nIf empty, this field is ignored. Maximum IDs: 10,000", + "description": "A list of device string identifiers. If empty, it will ignore this field.\nFor example, `['device0', 'device12']`. This field cannot hold more than\n10,000 entries.", "location": "query", "repeated": true, "type": "string" }, "deviceNumIds": { - "description": "A list of device numeric IDs. If empty, this field is ignored. Maximum\nIDs: 10,000.", + "description": "A list of device numerical ids. If empty, it will ignore this field. This\nfield cannot hold more than 10,000 entries.", "format": "uint64", "location": "query", "repeated": true, "type": "string" }, "fieldMask": { - "description": "The fields of the `Device` resource to be returned in the response. The\nfields `id` and `num_id` are always returned, along with any\nother fields specified.", + "description": "The fields of the `Device` resource to be returned in the response. The\nfields `id`, and `num_id` are always returned by default, along with any\nother fields specified.", "format": "google-fieldmask", "location": "query", "type": "string" }, "pageSize": { - "description": "The maximum number of devices to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested. A non-empty `next_page_token` in the response\nindicates that more data is available.", + "description": "The maximum number of devices to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested, but if there is a non-empty `page_token`, it\nindicates that more entries are available.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The value returned by the last `ListDevicesResponse`; indicates\nthat this is a continuation of a prior `ListDevices` call and\nthe system should return the next page of data.", + "description": "The value returned by the last `ListDevicesResponse`; indicates\nthat this is a continuation of a prior `ListDevices` call, and\nthat the system should return the next page of data.", "location": "query", "type": "string" }, @@ -913,35 +884,6 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloudiot" ] - }, - "sendCommandToDevice": { - "description": "Sends a command to the specified device. In order for a device to be able\nto receive commands, it must:\n1) be connected to Cloud IoT Core using the MQTT protocol, and\n2) be subscribed to the group of MQTT topics specified by\n /devices/{device-id}/commands/#. This subscription will receive commands\n at the top-level topic /devices/{device-id}/commands as well as commands\n for subfolders, like /devices/{device-id}/commands/subfolder.\n Note that subscribing to specific subfolders is not supported.\nIf the command could not be delivered to the device, this method will\nreturn an error; in particular, if the device is not subscribed, this\nmethod will return FAILED_PRECONDITION. Otherwise, this method will\nreturn OK. If the subscription is QoS 1, at least once delivery will be\nguaranteed; for QoS 0, no acknowledgment will be expected from the device.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/groups/{groupsId}/devices/{devicesId}:sendCommandToDevice", - "httpMethod": "POST", - "id": "cloudiot.projects.locations.registries.groups.devices.sendCommandToDevice", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/groups/[^/]+/devices/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:sendCommandToDevice", - "request": { - "$ref": "SendCommandToDeviceRequest" - }, - "response": { - "$ref": "SendCommandToDeviceResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloudiot" - ] } }, "resources": { @@ -1028,7 +970,7 @@ } } }, - "revision": "20180926", + "revision": "20180723", "rootUrl": "https://cloudiot.googleapis.com/", "schemas": { "Binding": { @@ -1110,24 +1052,6 @@ "format": "google-datetime", "type": "string" }, - "logLevel": { - "description": "**Beta Feature**\n\nThe logging verbosity for device activity. If unspecified,\nDeviceRegistry.log_level will be used.", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "NONE", - "ERROR", - "INFO", - "DEBUG" - ], - "enumDescriptions": [ - "No logging specified. If not specified, logging will be disabled.", - "Disables logging.", - "Error events will be logged.", - "Informational events will be logged, such as connections and\ndisconnections.", - "All events will be logged." - ], - "type": "string" - }, "metadata": { "additionalProperties": { "type": "string" @@ -1220,24 +1144,6 @@ "description": "The identifier of this device registry. For example, `myRegistry`.", "type": "string" }, - "logLevel": { - "description": "**Beta Feature**\n\nThe default logging verbosity for activity from devices in this registry.\nThe verbosity level can be overridden by Device.log_level.", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "NONE", - "ERROR", - "INFO", - "DEBUG" - ], - "enumDescriptions": [ - "No logging specified. If not specified, logging will be disabled.", - "Disables logging.", - "Error events will be logged.", - "Informational events will be logged, such as connections and\ndisconnections.", - "All events will be logged." - ], - "type": "string" - }, "mqttConfig": { "$ref": "MqttConfig", "description": "The MQTT configuration for this device registry." @@ -1534,28 +1440,6 @@ }, "type": "object" }, - "SendCommandToDeviceRequest": { - "description": "Request for `SendCommandToDevice`.", - "id": "SendCommandToDeviceRequest", - "properties": { - "binaryData": { - "description": "The command data to send to the device.", - "format": "byte", - "type": "string" - }, - "subfolder": { - "description": "Optional subfolder for the command. If empty, the command will be delivered\nto the /devices/{device-id}/commands topic, otherwise it will be delivered\nto the /devices/{device-id}/commands/{subfolder} topic. Multi-level\nsubfolders are allowed. This field must not have more than 256 characters,\nand must not contain any MQTT wildcards (\"+\" or \"#\") or null characters.", - "type": "string" - } - }, - "type": "object" - }, - "SendCommandToDeviceResponse": { - "description": "Response for `SendCommandToDevice`.", - "id": "SendCommandToDeviceResponse", - "properties": {}, - "type": "object" - }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", diff --git a/vendor/google.golang.org/api/cloudiot/v1/cloudiot-gen.go b/vendor/google.golang.org/api/cloudiot/v1/cloudiot-gen.go index 34164550..8358349a 100644 --- a/vendor/google.golang.org/api/cloudiot/v1/cloudiot-gen.go +++ b/vendor/google.golang.org/api/cloudiot/v1/cloudiot-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -362,23 +361,6 @@ type Device struct { // minutes. LastStateTime string `json:"lastStateTime,omitempty"` - // LogLevel: **Beta Feature** - // - // The logging verbosity for device activity. If - // unspecified, - // DeviceRegistry.log_level will be used. - // - // Possible values: - // "LOG_LEVEL_UNSPECIFIED" - No logging specified. If not specified, - // logging will be disabled. - // "NONE" - Disables logging. - // "ERROR" - Error events will be logged. - // "INFO" - Informational events will be logged, such as connections - // and - // disconnections. - // "DEBUG" - All events will be logged. - LogLevel string `json:"logLevel,omitempty"` - // Metadata: The metadata key-value pairs assigned to the device. This // metadata is not // interpreted or indexed by Cloud IoT Core. It can be used to add @@ -618,23 +600,6 @@ type DeviceRegistry struct { // `myRegistry`. Id string `json:"id,omitempty"` - // LogLevel: **Beta Feature** - // - // The default logging verbosity for activity from devices in this - // registry. - // The verbosity level can be overridden by Device.log_level. - // - // Possible values: - // "LOG_LEVEL_UNSPECIFIED" - No logging specified. If not specified, - // logging will be disabled. - // "NONE" - Disables logging. - // "ERROR" - Error events will be logged. - // "INFO" - Informational events will be logged, such as connections - // and - // disconnections. - // "DEBUG" - All events will be logged. - LogLevel string `json:"logLevel,omitempty"` - // MqttConfig: The MQTT configuration for this device registry. MqttConfig *MqttConfig `json:"mqttConfig,omitempty"` @@ -1343,53 +1308,6 @@ func (s *RegistryCredential) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SendCommandToDeviceRequest: Request for `SendCommandToDevice`. -type SendCommandToDeviceRequest struct { - // BinaryData: The command data to send to the device. - BinaryData string `json:"binaryData,omitempty"` - - // Subfolder: Optional subfolder for the command. If empty, the command - // will be delivered - // to the /devices/{device-id}/commands topic, otherwise it will be - // delivered - // to the /devices/{device-id}/commands/{subfolder} topic. - // Multi-level - // subfolders are allowed. This field must not have more than 256 - // characters, - // and must not contain any MQTT wildcards ("+" or "#") or null - // characters. - Subfolder string `json:"subfolder,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BinaryData") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BinaryData") 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 *SendCommandToDeviceRequest) MarshalJSON() ([]byte, error) { - type NoMethod SendCommandToDeviceRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SendCommandToDeviceResponse: Response for `SendCommandToDevice`. -type SendCommandToDeviceResponse struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - // SetIamPolicyRequest: Request message for `SetIamPolicy` method. type SetIamPolicyRequest struct { // Policy: REQUIRED: The complete policy to be applied to the @@ -1745,13 +1663,9 @@ func (c *ProjectsLocationsRegistriesCreateCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/registries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -1878,13 +1792,9 @@ func (c *ProjectsLocationsRegistriesDeleteCall) doRequest(alt string) (*http.Res reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2022,13 +1932,9 @@ func (c *ProjectsLocationsRegistriesGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2162,13 +2068,9 @@ func (c *ProjectsLocationsRegistriesGetIamPolicyCall) doRequest(alt string) (*ht } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2267,9 +2169,9 @@ func (r *ProjectsLocationsRegistriesService) List(parent string) *ProjectsLocati // of registries to return in the response. If this value // is zero, the service will select a default size. A call may return // fewer -// objects than requested. A non-empty `next_page_token` in the -// response -// indicates that more data is available. +// objects than requested, but if there is a non-empty `page_token`, +// it +// indicates that more entries are available. func (c *ProjectsLocationsRegistriesListCall) PageSize(pageSize int64) *ProjectsLocationsRegistriesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -2277,9 +2179,9 @@ func (c *ProjectsLocationsRegistriesListCall) PageSize(pageSize int64) *Projects // PageToken sets the optional parameter "pageToken": The value returned // by the last `ListDeviceRegistriesResponse`; indicates -// that this is a continuation of a prior `ListDeviceRegistries` call +// that this is a continuation of a prior `ListDeviceRegistries` call, // and -// the system should return the next page of data. +// that the system should return the next page of data. func (c *ProjectsLocationsRegistriesListCall) PageToken(pageToken string) *ProjectsLocationsRegistriesListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -2331,13 +2233,9 @@ func (c *ProjectsLocationsRegistriesListCall) doRequest(alt string) (*http.Respo } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/registries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -2392,13 +2290,13 @@ func (c *ProjectsLocationsRegistriesListCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "pageSize": { - // "description": "The maximum number of registries to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested. A non-empty `next_page_token` in the response\nindicates that more data is available.", + // "description": "The maximum number of registries to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested, but if there is a non-empty `page_token`, it\nindicates that more entries are available.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The value returned by the last `ListDeviceRegistriesResponse`; indicates\nthat this is a continuation of a prior `ListDeviceRegistries` call and\nthe system should return the next page of data.", + // "description": "The value returned by the last `ListDeviceRegistriesResponse`; indicates\nthat this is a continuation of a prior `ListDeviceRegistries` call, and\nthat the system should return the next page of data.", // "location": "query", // "type": "string" // }, @@ -2513,13 +2411,9 @@ func (c *ProjectsLocationsRegistriesPatchCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2661,13 +2555,9 @@ func (c *ProjectsLocationsRegistriesSetIamPolicyCall) doRequest(alt string) (*ht } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2805,13 +2695,9 @@ func (c *ProjectsLocationsRegistriesTestIamPermissionsCall) doRequest(alt string } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2945,13 +2831,9 @@ func (c *ProjectsLocationsRegistriesDevicesCreateCall) doRequest(alt string) (*h } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/devices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -3078,13 +2960,9 @@ func (c *ProjectsLocationsRegistriesDevicesDeleteCall) doRequest(alt string) (*h reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3230,13 +3108,9 @@ func (c *ProjectsLocationsRegistriesDevicesGetCall) doRequest(alt string) (*http } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3335,16 +3209,18 @@ func (r *ProjectsLocationsRegistriesDevicesService) List(parent string) *Project } // DeviceIds sets the optional parameter "deviceIds": A list of device -// string IDs. For example, `['device0', 'device12']`. -// If empty, this field is ignored. Maximum IDs: 10,000 +// string identifiers. If empty, it will ignore this field. +// For example, `['device0', 'device12']`. This field cannot hold more +// than +// 10,000 entries. func (c *ProjectsLocationsRegistriesDevicesListCall) DeviceIds(deviceIds ...string) *ProjectsLocationsRegistriesDevicesListCall { c.urlParams_.SetMulti("deviceIds", append([]string{}, deviceIds...)) return c } // DeviceNumIds sets the optional parameter "deviceNumIds": A list of -// device numeric IDs. If empty, this field is ignored. Maximum -// IDs: 10,000. +// device numerical ids. If empty, it will ignore this field. This +// field cannot hold more than 10,000 entries. func (c *ProjectsLocationsRegistriesDevicesListCall) DeviceNumIds(deviceNumIds ...uint64) *ProjectsLocationsRegistriesDevicesListCall { var deviceNumIds_ []string for _, v := range deviceNumIds { @@ -3356,7 +3232,8 @@ func (c *ProjectsLocationsRegistriesDevicesListCall) DeviceNumIds(deviceNumIds . // FieldMask sets the optional parameter "fieldMask": The fields of the // `Device` resource to be returned in the response. The -// fields `id` and `num_id` are always returned, along with any +// fields `id`, and `num_id` are always returned by default, along with +// any // other fields specified. func (c *ProjectsLocationsRegistriesDevicesListCall) FieldMask(fieldMask string) *ProjectsLocationsRegistriesDevicesListCall { c.urlParams_.Set("fieldMask", fieldMask) @@ -3367,9 +3244,9 @@ func (c *ProjectsLocationsRegistriesDevicesListCall) FieldMask(fieldMask string) // of devices to return in the response. If this value // is zero, the service will select a default size. A call may return // fewer -// objects than requested. A non-empty `next_page_token` in the -// response -// indicates that more data is available. +// objects than requested, but if there is a non-empty `page_token`, +// it +// indicates that more entries are available. func (c *ProjectsLocationsRegistriesDevicesListCall) PageSize(pageSize int64) *ProjectsLocationsRegistriesDevicesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -3377,8 +3254,8 @@ func (c *ProjectsLocationsRegistriesDevicesListCall) PageSize(pageSize int64) *P // PageToken sets the optional parameter "pageToken": The value returned // by the last `ListDevicesResponse`; indicates -// that this is a continuation of a prior `ListDevices` call and -// the system should return the next page of data. +// that this is a continuation of a prior `ListDevices` call, and +// that the system should return the next page of data. func (c *ProjectsLocationsRegistriesDevicesListCall) PageToken(pageToken string) *ProjectsLocationsRegistriesDevicesListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -3430,13 +3307,9 @@ func (c *ProjectsLocationsRegistriesDevicesListCall) doRequest(alt string) (*htt } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/devices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -3491,32 +3364,32 @@ func (c *ProjectsLocationsRegistriesDevicesListCall) Do(opts ...googleapi.CallOp // ], // "parameters": { // "deviceIds": { - // "description": "A list of device string IDs. For example, `['device0', 'device12']`.\nIf empty, this field is ignored. Maximum IDs: 10,000", + // "description": "A list of device string identifiers. If empty, it will ignore this field.\nFor example, `['device0', 'device12']`. This field cannot hold more than\n10,000 entries.", // "location": "query", // "repeated": true, // "type": "string" // }, // "deviceNumIds": { - // "description": "A list of device numeric IDs. If empty, this field is ignored. Maximum\nIDs: 10,000.", + // "description": "A list of device numerical ids. If empty, it will ignore this field. This\nfield cannot hold more than 10,000 entries.", // "format": "uint64", // "location": "query", // "repeated": true, // "type": "string" // }, // "fieldMask": { - // "description": "The fields of the `Device` resource to be returned in the response. The\nfields `id` and `num_id` are always returned, along with any\nother fields specified.", + // "description": "The fields of the `Device` resource to be returned in the response. The\nfields `id`, and `num_id` are always returned by default, along with any\nother fields specified.", // "format": "google-fieldmask", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The maximum number of devices to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested. A non-empty `next_page_token` in the response\nindicates that more data is available.", + // "description": "The maximum number of devices to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested, but if there is a non-empty `page_token`, it\nindicates that more entries are available.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The value returned by the last `ListDevicesResponse`; indicates\nthat this is a continuation of a prior `ListDevices` call and\nthe system should return the next page of data.", + // "description": "The value returned by the last `ListDevicesResponse`; indicates\nthat this is a continuation of a prior `ListDevices` call, and\nthat the system should return the next page of data.", // "location": "query", // "type": "string" // }, @@ -3622,13 +3495,9 @@ func (c *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall) doRequ } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:modifyCloudToDeviceConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3773,13 +3642,9 @@ func (c *ProjectsLocationsRegistriesDevicesPatchCall) doRequest(alt string) (*ht } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3862,166 +3727,6 @@ func (c *ProjectsLocationsRegistriesDevicesPatchCall) Do(opts ...googleapi.CallO } -// method id "cloudiot.projects.locations.registries.devices.sendCommandToDevice": - -type ProjectsLocationsRegistriesDevicesSendCommandToDeviceCall struct { - s *Service - name string - sendcommandtodevicerequest *SendCommandToDeviceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SendCommandToDevice: Sends a command to the specified device. In -// order for a device to be able -// to receive commands, it must: -// 1) be connected to Cloud IoT Core using the MQTT protocol, and -// 2) be subscribed to the group of MQTT topics specified by -// /devices/{device-id}/commands/#. This subscription will receive -// commands -// at the top-level topic /devices/{device-id}/commands as well as -// commands -// for subfolders, like /devices/{device-id}/commands/subfolder. -// Note that subscribing to specific subfolders is not supported. -// If the command could not be delivered to the device, this method -// will -// return an error; in particular, if the device is not subscribed, -// this -// method will return FAILED_PRECONDITION. Otherwise, this method -// will -// return OK. If the subscription is QoS 1, at least once delivery will -// be -// guaranteed; for QoS 0, no acknowledgment will be expected from the -// device. -func (r *ProjectsLocationsRegistriesDevicesService) SendCommandToDevice(name string, sendcommandtodevicerequest *SendCommandToDeviceRequest) *ProjectsLocationsRegistriesDevicesSendCommandToDeviceCall { - c := &ProjectsLocationsRegistriesDevicesSendCommandToDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.sendcommandtodevicerequest = sendcommandtodevicerequest - 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 *ProjectsLocationsRegistriesDevicesSendCommandToDeviceCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesSendCommandToDeviceCall { - 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 *ProjectsLocationsRegistriesDevicesSendCommandToDeviceCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesSendCommandToDeviceCall { - 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 *ProjectsLocationsRegistriesDevicesSendCommandToDeviceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRegistriesDevicesSendCommandToDeviceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.sendcommandtodevicerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:sendCommandToDevice") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudiot.projects.locations.registries.devices.sendCommandToDevice" call. -// Exactly one of *SendCommandToDeviceResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *SendCommandToDeviceResponse.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 *ProjectsLocationsRegistriesDevicesSendCommandToDeviceCall) Do(opts ...googleapi.CallOption) (*SendCommandToDeviceResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SendCommandToDeviceResponse{ - 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": "Sends a command to the specified device. In order for a device to be able\nto receive commands, it must:\n1) be connected to Cloud IoT Core using the MQTT protocol, and\n2) be subscribed to the group of MQTT topics specified by\n /devices/{device-id}/commands/#. This subscription will receive commands\n at the top-level topic /devices/{device-id}/commands as well as commands\n for subfolders, like /devices/{device-id}/commands/subfolder.\n Note that subscribing to specific subfolders is not supported.\nIf the command could not be delivered to the device, this method will\nreturn an error; in particular, if the device is not subscribed, this\nmethod will return FAILED_PRECONDITION. Otherwise, this method will\nreturn OK. If the subscription is QoS 1, at least once delivery will be\nguaranteed; for QoS 0, no acknowledgment will be expected from the device.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}:sendCommandToDevice", - // "httpMethod": "POST", - // "id": "cloudiot.projects.locations.registries.devices.sendCommandToDevice", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:sendCommandToDevice", - // "request": { - // "$ref": "SendCommandToDeviceRequest" - // }, - // "response": { - // "$ref": "SendCommandToDeviceResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloudiot" - // ] - // } - -} - // method id "cloudiot.projects.locations.registries.devices.configVersions.list": type ProjectsLocationsRegistriesDevicesConfigVersionsListCall struct { @@ -4098,13 +3803,9 @@ func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) doRequest(alt } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/configVersions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4260,13 +3961,9 @@ func (c *ProjectsLocationsRegistriesDevicesStatesListCall) doRequest(alt string) } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/states") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4406,13 +4103,9 @@ func (c *ProjectsLocationsRegistriesGroupsGetIamPolicyCall) doRequest(alt string } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -4548,13 +4241,9 @@ func (c *ProjectsLocationsRegistriesGroupsSetIamPolicyCall) doRequest(alt string } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -4692,13 +4381,9 @@ func (c *ProjectsLocationsRegistriesGroupsTestIamPermissionsCall) doRequest(alt } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -4847,13 +4532,9 @@ func (c *ProjectsLocationsRegistriesGroupsDevicesGetCall) doRequest(alt string) } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4952,16 +4633,18 @@ func (r *ProjectsLocationsRegistriesGroupsDevicesService) List(parent string) *P } // DeviceIds sets the optional parameter "deviceIds": A list of device -// string IDs. For example, `['device0', 'device12']`. -// If empty, this field is ignored. Maximum IDs: 10,000 +// string identifiers. If empty, it will ignore this field. +// For example, `['device0', 'device12']`. This field cannot hold more +// than +// 10,000 entries. func (c *ProjectsLocationsRegistriesGroupsDevicesListCall) DeviceIds(deviceIds ...string) *ProjectsLocationsRegistriesGroupsDevicesListCall { c.urlParams_.SetMulti("deviceIds", append([]string{}, deviceIds...)) return c } // DeviceNumIds sets the optional parameter "deviceNumIds": A list of -// device numeric IDs. If empty, this field is ignored. Maximum -// IDs: 10,000. +// device numerical ids. If empty, it will ignore this field. This +// field cannot hold more than 10,000 entries. func (c *ProjectsLocationsRegistriesGroupsDevicesListCall) DeviceNumIds(deviceNumIds ...uint64) *ProjectsLocationsRegistriesGroupsDevicesListCall { var deviceNumIds_ []string for _, v := range deviceNumIds { @@ -4973,7 +4656,8 @@ func (c *ProjectsLocationsRegistriesGroupsDevicesListCall) DeviceNumIds(deviceNu // FieldMask sets the optional parameter "fieldMask": The fields of the // `Device` resource to be returned in the response. The -// fields `id` and `num_id` are always returned, along with any +// fields `id`, and `num_id` are always returned by default, along with +// any // other fields specified. func (c *ProjectsLocationsRegistriesGroupsDevicesListCall) FieldMask(fieldMask string) *ProjectsLocationsRegistriesGroupsDevicesListCall { c.urlParams_.Set("fieldMask", fieldMask) @@ -4984,9 +4668,9 @@ func (c *ProjectsLocationsRegistriesGroupsDevicesListCall) FieldMask(fieldMask s // of devices to return in the response. If this value // is zero, the service will select a default size. A call may return // fewer -// objects than requested. A non-empty `next_page_token` in the -// response -// indicates that more data is available. +// objects than requested, but if there is a non-empty `page_token`, +// it +// indicates that more entries are available. func (c *ProjectsLocationsRegistriesGroupsDevicesListCall) PageSize(pageSize int64) *ProjectsLocationsRegistriesGroupsDevicesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -4994,8 +4678,8 @@ func (c *ProjectsLocationsRegistriesGroupsDevicesListCall) PageSize(pageSize int // PageToken sets the optional parameter "pageToken": The value returned // by the last `ListDevicesResponse`; indicates -// that this is a continuation of a prior `ListDevices` call and -// the system should return the next page of data. +// that this is a continuation of a prior `ListDevices` call, and +// that the system should return the next page of data. func (c *ProjectsLocationsRegistriesGroupsDevicesListCall) PageToken(pageToken string) *ProjectsLocationsRegistriesGroupsDevicesListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -5047,13 +4731,9 @@ func (c *ProjectsLocationsRegistriesGroupsDevicesListCall) doRequest(alt string) } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/devices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -5108,32 +4788,32 @@ func (c *ProjectsLocationsRegistriesGroupsDevicesListCall) Do(opts ...googleapi. // ], // "parameters": { // "deviceIds": { - // "description": "A list of device string IDs. For example, `['device0', 'device12']`.\nIf empty, this field is ignored. Maximum IDs: 10,000", + // "description": "A list of device string identifiers. If empty, it will ignore this field.\nFor example, `['device0', 'device12']`. This field cannot hold more than\n10,000 entries.", // "location": "query", // "repeated": true, // "type": "string" // }, // "deviceNumIds": { - // "description": "A list of device numeric IDs. If empty, this field is ignored. Maximum\nIDs: 10,000.", + // "description": "A list of device numerical ids. If empty, it will ignore this field. This\nfield cannot hold more than 10,000 entries.", // "format": "uint64", // "location": "query", // "repeated": true, // "type": "string" // }, // "fieldMask": { - // "description": "The fields of the `Device` resource to be returned in the response. The\nfields `id` and `num_id` are always returned, along with any\nother fields specified.", + // "description": "The fields of the `Device` resource to be returned in the response. The\nfields `id`, and `num_id` are always returned by default, along with any\nother fields specified.", // "format": "google-fieldmask", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The maximum number of devices to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested. A non-empty `next_page_token` in the response\nindicates that more data is available.", + // "description": "The maximum number of devices to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested, but if there is a non-empty `page_token`, it\nindicates that more entries are available.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The value returned by the last `ListDevicesResponse`; indicates\nthat this is a continuation of a prior `ListDevices` call and\nthe system should return the next page of data.", + // "description": "The value returned by the last `ListDevicesResponse`; indicates\nthat this is a continuation of a prior `ListDevices` call, and\nthat the system should return the next page of data.", // "location": "query", // "type": "string" // }, @@ -5239,13 +4919,9 @@ func (c *ProjectsLocationsRegistriesGroupsDevicesModifyCloudToDeviceConfigCall) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:modifyCloudToDeviceConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5390,13 +5066,9 @@ func (c *ProjectsLocationsRegistriesGroupsDevicesPatchCall) doRequest(alt string } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5479,166 +5151,6 @@ func (c *ProjectsLocationsRegistriesGroupsDevicesPatchCall) Do(opts ...googleapi } -// method id "cloudiot.projects.locations.registries.groups.devices.sendCommandToDevice": - -type ProjectsLocationsRegistriesGroupsDevicesSendCommandToDeviceCall struct { - s *Service - name string - sendcommandtodevicerequest *SendCommandToDeviceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SendCommandToDevice: Sends a command to the specified device. In -// order for a device to be able -// to receive commands, it must: -// 1) be connected to Cloud IoT Core using the MQTT protocol, and -// 2) be subscribed to the group of MQTT topics specified by -// /devices/{device-id}/commands/#. This subscription will receive -// commands -// at the top-level topic /devices/{device-id}/commands as well as -// commands -// for subfolders, like /devices/{device-id}/commands/subfolder. -// Note that subscribing to specific subfolders is not supported. -// If the command could not be delivered to the device, this method -// will -// return an error; in particular, if the device is not subscribed, -// this -// method will return FAILED_PRECONDITION. Otherwise, this method -// will -// return OK. If the subscription is QoS 1, at least once delivery will -// be -// guaranteed; for QoS 0, no acknowledgment will be expected from the -// device. -func (r *ProjectsLocationsRegistriesGroupsDevicesService) SendCommandToDevice(name string, sendcommandtodevicerequest *SendCommandToDeviceRequest) *ProjectsLocationsRegistriesGroupsDevicesSendCommandToDeviceCall { - c := &ProjectsLocationsRegistriesGroupsDevicesSendCommandToDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.sendcommandtodevicerequest = sendcommandtodevicerequest - 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 *ProjectsLocationsRegistriesGroupsDevicesSendCommandToDeviceCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesGroupsDevicesSendCommandToDeviceCall { - 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 *ProjectsLocationsRegistriesGroupsDevicesSendCommandToDeviceCall) Context(ctx context.Context) *ProjectsLocationsRegistriesGroupsDevicesSendCommandToDeviceCall { - 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 *ProjectsLocationsRegistriesGroupsDevicesSendCommandToDeviceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRegistriesGroupsDevicesSendCommandToDeviceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.sendcommandtodevicerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:sendCommandToDevice") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudiot.projects.locations.registries.groups.devices.sendCommandToDevice" call. -// Exactly one of *SendCommandToDeviceResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *SendCommandToDeviceResponse.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 *ProjectsLocationsRegistriesGroupsDevicesSendCommandToDeviceCall) Do(opts ...googleapi.CallOption) (*SendCommandToDeviceResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SendCommandToDeviceResponse{ - 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": "Sends a command to the specified device. In order for a device to be able\nto receive commands, it must:\n1) be connected to Cloud IoT Core using the MQTT protocol, and\n2) be subscribed to the group of MQTT topics specified by\n /devices/{device-id}/commands/#. This subscription will receive commands\n at the top-level topic /devices/{device-id}/commands as well as commands\n for subfolders, like /devices/{device-id}/commands/subfolder.\n Note that subscribing to specific subfolders is not supported.\nIf the command could not be delivered to the device, this method will\nreturn an error; in particular, if the device is not subscribed, this\nmethod will return FAILED_PRECONDITION. Otherwise, this method will\nreturn OK. If the subscription is QoS 1, at least once delivery will be\nguaranteed; for QoS 0, no acknowledgment will be expected from the device.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/groups/{groupsId}/devices/{devicesId}:sendCommandToDevice", - // "httpMethod": "POST", - // "id": "cloudiot.projects.locations.registries.groups.devices.sendCommandToDevice", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/groups/[^/]+/devices/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:sendCommandToDevice", - // "request": { - // "$ref": "SendCommandToDeviceRequest" - // }, - // "response": { - // "$ref": "SendCommandToDeviceResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/cloudiot" - // ] - // } - -} - // method id "cloudiot.projects.locations.registries.groups.devices.configVersions.list": type ProjectsLocationsRegistriesGroupsDevicesConfigVersionsListCall struct { @@ -5715,13 +5227,9 @@ func (c *ProjectsLocationsRegistriesGroupsDevicesConfigVersionsListCall) doReque } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/configVersions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5877,13 +5385,9 @@ func (c *ProjectsLocationsRegistriesGroupsDevicesStatesListCall) doRequest(alt s } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/states") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, diff --git a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json b/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json index 33c2eece..1f472316 100644 --- a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json +++ b/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://cloudkms.googleapis.com/", "batchPath": "batch", "canonicalName": "Cloud KMS", - "description": "Manages keys and performs cryptographic operations in a central cloud service, for direct use by other cloud resources and applications.\n", + "description": "Cloud KMS allows you to keep cryptographic keys in one central cloud service, for direct use by other cloud resources and applications. With Cloud KMS you are the ultimate custodian of your data, you can manage encryption in the cloud the same way you do on-premises, and you have a provable and monitorable root of trust over your data.\n", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/kms/", "fullyEncodeReservedExpansion": true, @@ -943,7 +943,7 @@ } } }, - "revision": "20181005", + "revision": "20180823", "rootUrl": "https://cloudkms.googleapis.com/", "schemas": { "AsymmetricDecryptRequest": { @@ -1132,15 +1132,12 @@ "RSA_SIGN_PSS_2048_SHA256", "RSA_SIGN_PSS_3072_SHA256", "RSA_SIGN_PSS_4096_SHA256", - "RSA_SIGN_PSS_4096_SHA512", "RSA_SIGN_PKCS1_2048_SHA256", "RSA_SIGN_PKCS1_3072_SHA256", "RSA_SIGN_PKCS1_4096_SHA256", - "RSA_SIGN_PKCS1_4096_SHA512", "RSA_DECRYPT_OAEP_2048_SHA256", "RSA_DECRYPT_OAEP_3072_SHA256", "RSA_DECRYPT_OAEP_4096_SHA256", - "RSA_DECRYPT_OAEP_4096_SHA512", "EC_SIGN_P256_SHA256", "EC_SIGN_P384_SHA384" ], @@ -1150,15 +1147,12 @@ "RSASSA-PSS 2048 bit key with a SHA256 digest.", "RSASSA-PSS 3072 bit key with a SHA256 digest.", "RSASSA-PSS 4096 bit key with a SHA256 digest.", - "RSASSA-PSS 4096 bit key with a SHA512 digest.", "RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.", "RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.", "RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.", - "RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.", "RSAES-OAEP 2048 bit key with a SHA256 digest.", "RSAES-OAEP 3072 bit key with a SHA256 digest.", "RSAES-OAEP 4096 bit key with a SHA256 digest.", - "RSAES-OAEP 4096 bit key with a SHA512 digest.", "ECDSA on the NIST P-256 curve with a SHA256 digest.", "ECDSA on the NIST P-384 curve with a SHA384 digest." ], @@ -1241,15 +1235,12 @@ "RSA_SIGN_PSS_2048_SHA256", "RSA_SIGN_PSS_3072_SHA256", "RSA_SIGN_PSS_4096_SHA256", - "RSA_SIGN_PSS_4096_SHA512", "RSA_SIGN_PKCS1_2048_SHA256", "RSA_SIGN_PKCS1_3072_SHA256", "RSA_SIGN_PKCS1_4096_SHA256", - "RSA_SIGN_PKCS1_4096_SHA512", "RSA_DECRYPT_OAEP_2048_SHA256", "RSA_DECRYPT_OAEP_3072_SHA256", "RSA_DECRYPT_OAEP_4096_SHA256", - "RSA_DECRYPT_OAEP_4096_SHA512", "EC_SIGN_P256_SHA256", "EC_SIGN_P384_SHA384" ], @@ -1259,15 +1250,12 @@ "RSASSA-PSS 2048 bit key with a SHA256 digest.", "RSASSA-PSS 3072 bit key with a SHA256 digest.", "RSASSA-PSS 4096 bit key with a SHA256 digest.", - "RSASSA-PSS 4096 bit key with a SHA512 digest.", "RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.", "RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.", "RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.", - "RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.", "RSAES-OAEP 2048 bit key with a SHA256 digest.", "RSAES-OAEP 3072 bit key with a SHA256 digest.", "RSAES-OAEP 4096 bit key with a SHA256 digest.", - "RSAES-OAEP 4096 bit key with a SHA512 digest.", "ECDSA on the NIST P-256 curve with a SHA256 digest.", "ECDSA on the NIST P-384 curve with a SHA384 digest." ], @@ -1610,46 +1598,6 @@ "description": "The public key for a given CryptoKeyVersion. Obtained via\nGetPublicKey.", "id": "PublicKey", "properties": { - "algorithm": { - "description": "The Algorithm associated\nwith this key.", - "enum": [ - "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED", - "GOOGLE_SYMMETRIC_ENCRYPTION", - "RSA_SIGN_PSS_2048_SHA256", - "RSA_SIGN_PSS_3072_SHA256", - "RSA_SIGN_PSS_4096_SHA256", - "RSA_SIGN_PSS_4096_SHA512", - "RSA_SIGN_PKCS1_2048_SHA256", - "RSA_SIGN_PKCS1_3072_SHA256", - "RSA_SIGN_PKCS1_4096_SHA256", - "RSA_SIGN_PKCS1_4096_SHA512", - "RSA_DECRYPT_OAEP_2048_SHA256", - "RSA_DECRYPT_OAEP_3072_SHA256", - "RSA_DECRYPT_OAEP_4096_SHA256", - "RSA_DECRYPT_OAEP_4096_SHA512", - "EC_SIGN_P256_SHA256", - "EC_SIGN_P384_SHA384" - ], - "enumDescriptions": [ - "Not specified.", - "Creates symmetric encryption keys.", - "RSASSA-PSS 2048 bit key with a SHA256 digest.", - "RSASSA-PSS 3072 bit key with a SHA256 digest.", - "RSASSA-PSS 4096 bit key with a SHA256 digest.", - "RSASSA-PSS 4096 bit key with a SHA512 digest.", - "RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.", - "RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.", - "RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.", - "RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.", - "RSAES-OAEP 2048 bit key with a SHA256 digest.", - "RSAES-OAEP 3072 bit key with a SHA256 digest.", - "RSAES-OAEP 4096 bit key with a SHA256 digest.", - "RSAES-OAEP 4096 bit key with a SHA512 digest.", - "ECDSA on the NIST P-256 curve with a SHA256 digest.", - "ECDSA on the NIST P-384 curve with a SHA384 digest." - ], - "type": "string" - }, "pem": { "description": "The public key, encoded in PEM format. For more information, see the\n[RFC 7468](https://tools.ietf.org/html/rfc7468) sections for\n[General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and\n[Textual Encoding of Subject Public Key Info]\n(https://tools.ietf.org/html/rfc7468#section-13).", "type": "string" diff --git a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-gen.go b/vendor/google.golang.org/api/cloudkms/v1/cloudkms-gen.go index b840421b..92ec15d1 100644 --- a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-gen.go +++ b/vendor/google.golang.org/api/cloudkms/v1/cloudkms-gen.go @@ -16,16 +16,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -636,24 +635,18 @@ type CryptoKeyVersion struct { // digest. // "RSA_SIGN_PSS_4096_SHA256" - RSASSA-PSS 4096 bit key with a SHA256 // digest. - // "RSA_SIGN_PSS_4096_SHA512" - RSASSA-PSS 4096 bit key with a SHA512 - // digest. // "RSA_SIGN_PKCS1_2048_SHA256" - RSASSA-PKCS1-v1_5 with a 2048 bit // key and a SHA256 digest. // "RSA_SIGN_PKCS1_3072_SHA256" - RSASSA-PKCS1-v1_5 with a 3072 bit // key and a SHA256 digest. // "RSA_SIGN_PKCS1_4096_SHA256" - RSASSA-PKCS1-v1_5 with a 4096 bit // key and a SHA256 digest. - // "RSA_SIGN_PKCS1_4096_SHA512" - RSASSA-PKCS1-v1_5 with a 4096 bit - // key and a SHA512 digest. // "RSA_DECRYPT_OAEP_2048_SHA256" - RSAES-OAEP 2048 bit key with a // SHA256 digest. // "RSA_DECRYPT_OAEP_3072_SHA256" - RSAES-OAEP 3072 bit key with a // SHA256 digest. // "RSA_DECRYPT_OAEP_4096_SHA256" - RSAES-OAEP 4096 bit key with a // SHA256 digest. - // "RSA_DECRYPT_OAEP_4096_SHA512" - RSAES-OAEP 4096 bit key with a - // SHA512 digest. // "EC_SIGN_P256_SHA256" - ECDSA on the NIST P-256 curve with a SHA256 // digest. // "EC_SIGN_P384_SHA384" - ECDSA on the NIST P-384 curve with a SHA384 @@ -780,24 +773,18 @@ type CryptoKeyVersionTemplate struct { // digest. // "RSA_SIGN_PSS_4096_SHA256" - RSASSA-PSS 4096 bit key with a SHA256 // digest. - // "RSA_SIGN_PSS_4096_SHA512" - RSASSA-PSS 4096 bit key with a SHA512 - // digest. // "RSA_SIGN_PKCS1_2048_SHA256" - RSASSA-PKCS1-v1_5 with a 2048 bit // key and a SHA256 digest. // "RSA_SIGN_PKCS1_3072_SHA256" - RSASSA-PKCS1-v1_5 with a 3072 bit // key and a SHA256 digest. // "RSA_SIGN_PKCS1_4096_SHA256" - RSASSA-PKCS1-v1_5 with a 4096 bit // key and a SHA256 digest. - // "RSA_SIGN_PKCS1_4096_SHA512" - RSASSA-PKCS1-v1_5 with a 4096 bit - // key and a SHA512 digest. // "RSA_DECRYPT_OAEP_2048_SHA256" - RSAES-OAEP 2048 bit key with a // SHA256 digest. // "RSA_DECRYPT_OAEP_3072_SHA256" - RSAES-OAEP 3072 bit key with a // SHA256 digest. // "RSA_DECRYPT_OAEP_4096_SHA256" - RSAES-OAEP 4096 bit key with a // SHA256 digest. - // "RSA_DECRYPT_OAEP_4096_SHA512" - RSAES-OAEP 4096 bit key with a - // SHA512 digest. // "EC_SIGN_P256_SHA256" - ECDSA on the NIST P-256 curve with a SHA256 // digest. // "EC_SIGN_P384_SHA384" - ECDSA on the NIST P-384 curve with a SHA384 @@ -1528,42 +1515,6 @@ func (s *Policy) MarshalJSON() ([]byte, error) { // via // GetPublicKey. type PublicKey struct { - // Algorithm: The Algorithm associated - // with this key. - // - // Possible values: - // "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED" - Not specified. - // "GOOGLE_SYMMETRIC_ENCRYPTION" - Creates symmetric encryption keys. - // "RSA_SIGN_PSS_2048_SHA256" - RSASSA-PSS 2048 bit key with a SHA256 - // digest. - // "RSA_SIGN_PSS_3072_SHA256" - RSASSA-PSS 3072 bit key with a SHA256 - // digest. - // "RSA_SIGN_PSS_4096_SHA256" - RSASSA-PSS 4096 bit key with a SHA256 - // digest. - // "RSA_SIGN_PSS_4096_SHA512" - RSASSA-PSS 4096 bit key with a SHA512 - // digest. - // "RSA_SIGN_PKCS1_2048_SHA256" - RSASSA-PKCS1-v1_5 with a 2048 bit - // key and a SHA256 digest. - // "RSA_SIGN_PKCS1_3072_SHA256" - RSASSA-PKCS1-v1_5 with a 3072 bit - // key and a SHA256 digest. - // "RSA_SIGN_PKCS1_4096_SHA256" - RSASSA-PKCS1-v1_5 with a 4096 bit - // key and a SHA256 digest. - // "RSA_SIGN_PKCS1_4096_SHA512" - RSASSA-PKCS1-v1_5 with a 4096 bit - // key and a SHA512 digest. - // "RSA_DECRYPT_OAEP_2048_SHA256" - RSAES-OAEP 2048 bit key with a - // SHA256 digest. - // "RSA_DECRYPT_OAEP_3072_SHA256" - RSAES-OAEP 3072 bit key with a - // SHA256 digest. - // "RSA_DECRYPT_OAEP_4096_SHA256" - RSAES-OAEP 4096 bit key with a - // SHA256 digest. - // "RSA_DECRYPT_OAEP_4096_SHA512" - RSAES-OAEP 4096 bit key with a - // SHA512 digest. - // "EC_SIGN_P256_SHA256" - ECDSA on the NIST P-256 curve with a SHA256 - // digest. - // "EC_SIGN_P384_SHA384" - ECDSA on the NIST P-384 curve with a SHA384 - // digest. - Algorithm string `json:"algorithm,omitempty"` - // Pem: The public key, encoded in PEM format. For more information, see // the // [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for @@ -1579,7 +1530,7 @@ type PublicKey struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Algorithm") to + // ForceSendFields is a list of field names (e.g. "Pem") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -1587,8 +1538,8 @@ type PublicKey struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Algorithm") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Pem") 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. @@ -1814,13 +1765,9 @@ func (c *ProjectsLocationsGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1979,13 +1926,9 @@ func (c *ProjectsLocationsListCall) 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, "v1/{+name}/locations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2160,13 +2103,9 @@ func (c *ProjectsLocationsKeyRingsCreateCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keyRings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -2311,13 +2250,9 @@ func (c *ProjectsLocationsKeyRingsGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2457,13 +2392,9 @@ func (c *ProjectsLocationsKeyRingsGetIamPolicyCall) doRequest(alt string) (*http } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2621,13 +2552,9 @@ func (c *ProjectsLocationsKeyRingsListCall) 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, "v1/{+parent}/keyRings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -2791,13 +2718,9 @@ func (c *ProjectsLocationsKeyRingsSetIamPolicyCall) doRequest(alt string) (*http } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2940,13 +2863,9 @@ func (c *ProjectsLocationsKeyRingsTestIamPermissionsCall) doRequest(alt string) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -3091,13 +3010,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCreateCall) doRequest(alt string) (* } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cryptoKeys") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -3237,13 +3152,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysDecryptCall) doRequest(alt string) ( } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:decrypt") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3379,13 +3290,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysEncryptCall) doRequest(alt string) ( } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:encrypt") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3526,13 +3433,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysGetCall) doRequest(alt string) (*htt } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3672,13 +3575,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysGetIamPolicyCall) doRequest(alt stri } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -3848,13 +3747,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysListCall) doRequest(alt string) (*ht } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cryptoKeys") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -4032,13 +3927,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysPatchCall) doRequest(alt string) (*h } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4179,13 +4070,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysSetIamPolicyCall) doRequest(alt stri } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -4328,13 +4215,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysTestIamPermissionsCall) doRequest(al } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -4470,13 +4353,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysUpdatePrimaryVersionCall) doRequest( } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:updatePrimaryVersion") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4613,13 +4492,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsAsymmetricDecryptCa } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:asymmetricDecrypt") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4756,13 +4631,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsAsymmetricSignCall) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:asymmetricSign") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4899,13 +4770,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsCreateCall) doReque } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cryptoKeyVersions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -5050,13 +4917,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsDestroyCall) doRequ } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:destroy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5196,13 +5059,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetCall) doRequest( } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5343,13 +5202,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetPublicKeyCall) d } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/publicKey") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5519,13 +5374,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall) doRequest } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cryptoKeyVersions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -5710,13 +5561,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsPatchCall) doReques } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5862,13 +5709,9 @@ func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsRestoreCall) doRequ } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restore") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json index ee94510f..e58fd77c 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json +++ b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json @@ -15,7 +15,7 @@ "baseUrl": "https://cloudresourcemanager.googleapis.com/", "batchPath": "batch", "canonicalName": "Cloud Resource Manager", - "description": "Creates, reads, and updates metadata for Google Cloud Platform resource containers.", + "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/resource-manager", "fullyEncodeReservedExpansion": true, @@ -1170,7 +1170,7 @@ } } }, - "revision": "20181015", + "revision": "20180815", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "Ancestor": { @@ -1841,7 +1841,7 @@ "additionalProperties": { "type": "string" }, - "description": "The labels associated with this Project.\n\nLabel keys must be between 1 and 63 characters long and must conform\nto the following regular expression: \\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?.\n\nLabel values must be between 0 and 63 characters long and must conform\nto the regular expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?. A label\nvalue can be empty.\n\nNo more than 256 labels can be associated with a given resource.\n\nClients should store labels in a representation such as JSON that does not\ndepend on specific characters being disallowed.\n\nExample: \u003ccode\u003e\"environment\" : \"dev\"\u003c/code\u003e\nRead-write.", + "description": "The labels associated with this Project.\n\nLabel keys must be between 1 and 63 characters long and must conform\nto the following regular expression: \\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?.\n\nLabel values must be between 0 and 63 characters long and must conform\nto the regular expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?.\n\nNo more than 256 labels can be associated with a given resource.\n\nClients should store labels in a representation such as JSON that does not\ndepend on specific characters being disallowed.\n\nExample: \u003ccode\u003e\"environment\" : \"dev\"\u003c/code\u003e\nRead-write.", "type": "object" }, "lifecycleState": { @@ -1909,7 +1909,7 @@ "type": "string" }, "type": { - "description": "Required field representing the resource type this id is for.\nAt present, the valid types are: \"organization\" and \"folder\".", + "description": "Required field representing the resource type this id is for.\nAt present, the valid types are: \"organization\"", "type": "string" } }, diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go index ec405fdc..c3cd3575 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go +++ b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -1869,9 +1868,7 @@ type Project struct { // // Label values must be between 0 and 63 characters long and must // conform - // to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A - // label - // value can be empty. + // to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. // // No more than 256 labels can be associated with a given // resource. @@ -2027,7 +2024,7 @@ type ResourceId struct { // Type: Required field representing the resource type this id is // for. - // At present, the valid types are: "organization" and "folder". + // At present, the valid types are: "organization" Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Id") to @@ -2505,13 +2502,9 @@ func (c *FoldersClearOrgPolicyCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:clearOrgPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2652,13 +2645,9 @@ func (c *FoldersGetEffectiveOrgPolicyCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getEffectiveOrgPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2800,13 +2789,9 @@ func (c *FoldersGetOrgPolicyCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getOrgPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2941,13 +2926,9 @@ func (c *FoldersListAvailableOrgPolicyConstraintsCall) doRequest(alt string) (*h } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listAvailableOrgPolicyConstraints") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -3105,13 +3086,9 @@ func (c *FoldersListOrgPoliciesCall) 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, "v1/{+resource}:listOrgPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -3272,13 +3249,9 @@ func (c *FoldersSetOrgPolicyCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setOrgPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -3419,13 +3392,9 @@ func (c *LiensCreateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/liens") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -3545,13 +3514,9 @@ func (c *LiensDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.nameid, @@ -3697,13 +3662,9 @@ func (c *LiensGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.nameid, @@ -3868,13 +3829,9 @@ func (c *LiensListCall) 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, "v1/liens") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -4041,13 +3998,9 @@ func (c *OperationsGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4178,13 +4131,9 @@ func (c *OrganizationsClearOrgPolicyCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:clearOrgPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -4325,13 +4274,9 @@ func (c *OrganizationsGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4470,13 +4415,9 @@ func (c *OrganizationsGetEffectiveOrgPolicyCall) doRequest(alt string) (*http.Re } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getEffectiveOrgPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -4620,13 +4561,9 @@ func (c *OrganizationsGetIamPolicyCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -4768,13 +4705,9 @@ func (c *OrganizationsGetOrgPolicyCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getOrgPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -4909,13 +4842,9 @@ func (c *OrganizationsListAvailableOrgPolicyConstraintsCall) doRequest(alt strin } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listAvailableOrgPolicyConstraints") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -5073,13 +5002,9 @@ func (c *OrganizationsListOrgPoliciesCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listOrgPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -5242,13 +5167,9 @@ func (c *OrganizationsSearchCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/organizations:search") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -5399,13 +5320,9 @@ func (c *OrganizationsSetIamPolicyCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -5544,13 +5461,9 @@ func (c *OrganizationsSetOrgPolicyCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setOrgPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -5688,13 +5601,9 @@ func (c *OrganizationsTestIamPermissionsCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -5828,13 +5737,9 @@ func (c *ProjectsClearOrgPolicyCall) 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, "v1/{+resource}:clearOrgPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -5993,13 +5898,9 @@ func (c *ProjectsCreateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -6134,13 +6035,9 @@ func (c *ProjectsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -6279,13 +6176,9 @@ func (c *ProjectsGetCall) 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, "v1/projects/{projectId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -6420,13 +6313,9 @@ func (c *ProjectsGetAncestryCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:getAncestry") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -6567,13 +6456,9 @@ func (c *ProjectsGetEffectiveOrgPolicyCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getEffectiveOrgPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -6718,13 +6603,9 @@ func (c *ProjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -6865,13 +6746,9 @@ func (c *ProjectsGetOrgPolicyCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getOrgPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -7085,13 +6962,9 @@ func (c *ProjectsListCall) 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, "v1/projects") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -7248,13 +7121,9 @@ func (c *ProjectsListAvailableOrgPolicyConstraintsCall) doRequest(alt string) (* } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listAvailableOrgPolicyConstraints") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -7412,13 +7281,9 @@ func (c *ProjectsListOrgPoliciesCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listOrgPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -7639,13 +7504,9 @@ func (c *ProjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -7783,13 +7644,9 @@ func (c *ProjectsSetOrgPolicyCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setOrgPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -7925,13 +7782,9 @@ func (c *ProjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -8072,13 +7925,9 @@ func (c *ProjectsUndeleteCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:undelete") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -8214,13 +8063,9 @@ func (c *ProjectsUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json b/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json index 866ccd50..203a7042 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json +++ b/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json @@ -15,7 +15,7 @@ "baseUrl": "https://cloudresourcemanager.googleapis.com/", "batchPath": "batch", "canonicalName": "Cloud Resource Manager", - "description": "Creates, reads, and updates metadata for Google Cloud Platform resource containers.", + "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/resource-manager", "fullyEncodeReservedExpansion": true, @@ -449,7 +449,7 @@ } } }, - "revision": "20181015", + "revision": "20180815", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go b/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go index dc653377..c050d6d4 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go +++ b/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -1300,13 +1299,9 @@ func (c *FoldersCreateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/folders") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -1436,13 +1431,9 @@ func (c *FoldersDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1586,13 +1577,9 @@ func (c *FoldersGetCall) 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1730,13 +1717,9 @@ func (c *FoldersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -1924,13 +1907,9 @@ func (c *FoldersListCall) 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, "v2/folders") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -2116,13 +2095,9 @@ func (c *FoldersMoveCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:move") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2284,13 +2259,9 @@ func (c *FoldersPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2434,13 +2405,9 @@ func (c *FoldersSearchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/folders:search") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -2589,13 +2556,9 @@ func (c *FoldersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2733,13 +2696,9 @@ func (c *FoldersTestIamPermissionsCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2885,13 +2844,9 @@ func (c *FoldersUndeleteCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3035,13 +2990,9 @@ func (c *OperationsGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, diff --git a/vendor/google.golang.org/api/composer/v1/composer-api.json b/vendor/google.golang.org/api/composer/v1/composer-api.json index 96e45c5f..9f1e8754 100644 --- a/vendor/google.golang.org/api/composer/v1/composer-api.json +++ b/vendor/google.golang.org/api/composer/v1/composer-api.json @@ -241,7 +241,7 @@ "type": "string" }, "updateMask": { - "description": "Required. A comma-separated list of paths, relative to `Environment`, of\nfields to update.\nFor example, to set the version of scikit-learn to install in the\nenvironment to 0.19.0 and to remove an existing installation of\nnumpy, the `updateMask` parameter would include the following two\n`paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and\n\"config.softwareConfig.pypiPackages.numpy\". The included patch\nenvironment would specify the scikit-learn version as follows:\n\n {\n \"config\":{\n \"softwareConfig\":{\n \"pypiPackages\":{\n \"scikit-learn\":\"==0.19.0\"\n }\n }\n }\n }\n\nNote that in the above example, any existing PyPI packages\nother than scikit-learn and numpy will be unaffected.\n\nOnly one update type may be included in a single request's `updateMask`.\nFor example, one cannot update both the PyPI packages and\nlabels in the same request. However, it is possible to update multiple\nmembers of a map field simultaneously in the same request. For example,\nto set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming\nit already exists), one can\nprovide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\"\nand populate the patch environment as follows:\n\n {\n \"labels\":{\n \"label1\":\"new-label1-value\"\n \"label2\":\"new-label2-value\"\n }\n }\n\nNote that in the above example, any existing labels that are not\nincluded in the `updateMask` will be unaffected.\n\nIt is also possible to replace an entire map field by providing the\nmap field's path in the `updateMask`. The new value of the field will\nbe that which is provided in the patch environment. For example, to\ndelete all pre-existing user-specified PyPI packages and\ninstall botocore at version 1.7.14, the `updateMask` would contain\nthe path \"config.softwareConfig.pypiPackages\", and\nthe patch environment would be the following:\n\n {\n \"config\":{\n \"softwareConfig\":{\n \"pypiPackages\":{\n \"botocore\":\"==1.7.14\"\n }\n }\n }\n }\n\n**Note:** Only the following fields can be updated:\n\n \u003ctable\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cstrong\u003eMask\u003c/strong\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cstrong\u003ePurpose\u003c/strong\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.pypiPackages\n \u003c/td\u003e\n \u003ctd\u003eReplace all custom custom PyPI packages. If a replacement\n package map is not included in `environment`, all custom\n PyPI packages are cleared. It is an error to provide both this mask and a\n mask specifying an individual package.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.pypiPackages.\u003cvar\u003epackagename\u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eUpdate the custom PyPI package \u003cvar\u003epackagename\u003c/var\u003e,\n preserving other packages. To delete the package, include it in\n `updateMask`, and omit the mapping for it in\n `environment.config.softwareConfig.pypiPackages`. It is an error\n to provide both a mask of this form and the\n \"config.softwareConfig.pypiPackages\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003elabels\u003c/td\u003e\n \u003ctd\u003eReplace all environment labels. If a replacement labels map is not\n included in `environment`, all labels are cleared. It is an error to\n provide both this mask and a mask specifying one or more individual\n labels.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003elabels.\u003cvar\u003elabelName\u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eSet the label named \u003cvar\u003elabelName\u003c/var\u003e, while preserving other\n labels. To delete the label, include it in `updateMask` and omit its\n mapping in `environment.labels`. It is an error to provide both a\n mask of this form and the \"labels\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.nodeCount\u003c/td\u003e\n \u003ctd\u003eHorizontally scale the number of nodes in the environment. An integer\n greater than or equal to 3 must be provided in the `config.nodeCount` field.\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.airflowConfigOverrides\u003c/td\u003e\n \u003ctd\u003eReplace all Apache Airflow config overrides. If a replacement config\n overrides map is not included in `environment`, all config overrides\n are cleared.\n It is an error to provide both this mask and a mask specifying one or\n more individual config overrides.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.airflowConfigOverrides.\u003cvar\u003esection\u003c/var\u003e-\u003cvar\u003ename\n \u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eOverride the Apache Airflow config property \u003cvar\u003ename\u003c/var\u003e in the\n section named \u003cvar\u003esection\u003c/var\u003e, preserving other properties. To delete\n the property override, include it in `updateMask` and omit its mapping\n in `environment.config.softwareConfig.airflowConfigOverrides`.\n It is an error to provide both a mask of this form and the\n \"config.softwareConfig.airflowConfigOverrides\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.envVariables\u003c/td\u003e\n \u003ctd\u003eReplace all environment variables. If a replacement environment\n variable map is not included in `environment`, all custom environment\n variables are cleared.\n It is an error to provide both this mask and a mask specifying one or\n more individual environment variables.\u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e", + "description": "Required. A comma-separated list of paths, relative to `Environment`, of\nfields to update.\nFor example, to set the version of scikit-learn to install in the\nenvironment to 0.19.0 and to remove an existing installation of\nnumpy, the `updateMask` parameter would include the following two\n`paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and\n\"config.softwareConfig.pypiPackages.numpy\". The included patch\nenvironment would specify the scikit-learn version as follows:\n\n {\n \"config\":{\n \"softwareConfig\":{\n \"pypiPackages\":{\n \"scikit-learn\":\"==0.19.0\"\n }\n }\n }\n }\n\nNote that in the above example, any existing PyPI packages\nother than scikit-learn and numpy will be unaffected.\n\nOnly one update type may be included in a single request's `updateMask`.\nFor example, one cannot update both the PyPI packages and\nlabels in the same request. However, it is possible to update multiple\nmembers of a map field simultaneously in the same request. For example,\nto set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming\nit already exists), one can\nprovide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\"\nand populate the patch environment as follows:\n\n {\n \"labels\":{\n \"label1\":\"new-label1-value\"\n \"label2\":\"new-label2-value\"\n }\n }\n\nNote that in the above example, any existing labels that are not\nincluded in the `updateMask` will be unaffected.\n\nIt is also possible to replace an entire map field by providing the\nmap field's path in the `updateMask`. The new value of the field will\nbe that which is provided in the patch environment. For example, to\ndelete all pre-existing user-specified PyPI packages and\ninstall botocore at version 1.7.14, the `updateMask` would contain\nthe path \"config.softwareConfig.pypiPackages\", and\nthe patch environment would be the following:\n\n {\n \"config\":{\n \"softwareConfig\":{\n \"pypiPackages\":{\n \"botocore\":\"==1.7.14\"\n }\n }\n }\n }\n\n**Note:** Only the following fields can be updated:\n\n \u003ctable\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cstrong\u003eMask\u003c/strong\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cstrong\u003ePurpose\u003c/strong\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.pypiPackages\n \u003c/td\u003e\n \u003ctd\u003eReplace all custom custom PyPI packages. If a replacement\n package map is not included in `environment`, all custom\n PyPI packages are cleared. It is an error to provide both this mask and a\n mask specifying an individual package.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.pypiPackages.\u003cvar\u003epackagename\u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eUpdate the custom PyPI package \u003cvar\u003epackagename\u003c/var\u003e,\n preserving other packages. To delete the package, include it in\n `updateMask`, and omit the mapping for it in\n `environment.config.softwareConfig.pypiPackages`. It is an error\n to provide both a mask of this form and the\n \"config.softwareConfig.pypiPackages\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003elabels\u003c/td\u003e\n \u003ctd\u003eReplace all environment labels. If a replacement labels map is not\n included in `environment`, all labels are cleared. It is an error to\n provide both this mask and a mask specifying one or more individual\n labels.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003elabels.\u003cvar\u003elabelName\u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eSet the label named \u003cvar\u003elabelName\u003c/var\u003e, while preserving other\n labels. To delete the label, include it in `updateMask` and omit its\n mapping in `environment.labels`. It is an error to provide both a\n mask of this form and the \"labels\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.nodeCount\u003c/td\u003e\n \u003ctd\u003eHorizontally scale the number of nodes in the environment. An integer\n greater than or equal to 3 must be provided in the `config.nodeCount` field.\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.airflowConfigOverrides\u003c/td\u003e\n \u003ctd\u003eReplace all Apache Airflow config overrides. If a replacement config\n overrides map is not included in `environment`, all config overrides\n are cleared.\n It is an error to provide both this mask and a mask specifying one or\n more individual config overrides.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.properties.\u003cvar\u003esection\u003c/var\u003e-\u003cvar\u003ename\n \u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eOverride the Apache Airflow property \u003cvar\u003ename\u003c/var\u003e in the section\n named \u003cvar\u003esection\u003c/var\u003e, preserving other properties. To delete the\n property override, include it in `updateMask` and omit its mapping\n in `environment.config.softwareConfig.properties`.\n It is an error to provide both a mask of this form and the\n \"config.softwareConfig.properties\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.envVariables\u003c/td\u003e\n \u003ctd\u003eReplace all environment variables. If a replacement environment\n variable map is not included in `environment`, all custom environment\n variables are cleared.\n It is an error to provide both this mask and a mask specifying one or\n more individual environment variables.\u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e", "format": "google-fieldmask", "location": "query", "type": "string" @@ -360,7 +360,7 @@ } } }, - "revision": "20181001", + "revision": "20180815", "rootUrl": "https://composer.googleapis.com/", "schemas": { "Empty": { @@ -430,7 +430,7 @@ "id": "EnvironmentConfig", "properties": { "airflowUri": { - "description": "Output only.\nThe URI of the Apache Airflow Web UI hosted within this environment (see\n[Airflow web interface](/composer/docs/how-to/accessing/airflow-web-interface)).", + "description": "The URI of the Apache Airflow Web UI hosted within this environment (see\n[Airflow web interface](/composer/docs/how-to/accessing/airflow-web-interface)).", "type": "string" }, "dagGcsPrefix": { @@ -511,7 +511,7 @@ "type": "string" }, "network": { - "description": "Optional. The Compute Engine network to be used for machine\ncommunications, specified as a\n[relative resource name](/apis/design/resource_names#relative_resource_name).\nFor example: \"projects/{projectId}/global/networks/{networkId}\".\n\n[Shared VPC](/vpc/docs/shared-vpc) is not currently supported. The\nnetwork must belong to the environment's project. If unspecified, the\n\"default\" network ID in the environment's project is used. If a\n[Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)\nis provided, `nodeConfig.subnetwork` must also be provided.", + "description": "Optional. The Compute Engine network to be used for machine\ncommunications, specified as a\n[relative resource name](/apis/design/resource_names#relative_resource_name).\nFor example: \"projects/{projectId}/global/networks/{networkId}\".\n\n[Shared VPC](/vpc/docs/shared-vpc) is not currently supported. The\nnetwork must belong to the environment's project. If unspecified, the\n\"default\" network ID in the environment's project is used. If a\n[Custom Subnet Network]((/vpc/docs/vpc#vpc_networks_and_subnets)\nis provided, `nodeConfig.subnetwork` must also be provided.", "type": "string" }, "oauthScopes": { diff --git a/vendor/google.golang.org/api/composer/v1/composer-gen.go b/vendor/google.golang.org/api/composer/v1/composer-gen.go index 11f6f086..c165b10c 100644 --- a/vendor/google.golang.org/api/composer/v1/composer-gen.go +++ b/vendor/google.golang.org/api/composer/v1/composer-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -221,9 +220,8 @@ func (s *Environment) MarshalJSON() ([]byte, error) { // EnvironmentConfig: Configuration information for an environment. type EnvironmentConfig struct { - // AirflowUri: Output only. - // The URI of the Apache Airflow Web UI hosted within this environment - // (see + // AirflowUri: The URI of the Apache Airflow Web UI hosted within this + // environment (see // [Airflow web // interface](/composer/docs/how-to/accessing/airflow-web-interface)). AirflowUri string `json:"airflowUri,omitempty"` @@ -431,7 +429,7 @@ type NodeConfig struct { // the // "default" network ID in the environment's project is used. If // a - // [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) + // [Custom Subnet Network]((/vpc/docs/vpc#vpc_networks_and_subnets) // is provided, `nodeConfig.subnetwork` must also be provided. Network string `json:"network,omitempty"` @@ -935,13 +933,9 @@ func (c *ProjectsLocationsEnvironmentsCreateCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/environments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -1067,13 +1061,9 @@ func (c *ProjectsLocationsEnvironmentsDeleteCall) doRequest(alt string) (*http.R reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1210,13 +1200,9 @@ func (c *ProjectsLocationsEnvironmentsGetCall) doRequest(alt string) (*http.Resp } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1367,13 +1353,9 @@ func (c *ProjectsLocationsEnvironmentsListCall) 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, "v1/{+parent}/environments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -1636,19 +1618,16 @@ func (r *ProjectsLocationsEnvironmentsService) Patch(name string, environment *E // more individual config overrides. // // -// -// config.softwareConfig.airflowConfigOverrides.section-name +// config.softwareConfig.properties.section-name // -// Override the Apache Airflow config property name in +// Override the Apache Airflow property name in the +// section +// named section, preserving other properties. To delete // the -// section named section, preserving other properties. To -// delete -// the property override, include it in `updateMask` and omit its -// mapping -// in `environment.config.softwareConfig.airflowConfigOverrides`. +// property override, include it in `updateMask` and omit its mapping +// in `environment.config.softwareConfig.properties`. // It is an error to provide both a mask of this form and the -// "config.softwareConfig.airflowConfigOverrides" mask. +// "config.softwareConfig.properties" mask. // // // config.softwareConfig.envVariables @@ -1705,13 +1684,9 @@ func (c *ProjectsLocationsEnvironmentsPatchCall) doRequest(alt string) (*http.Re } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1773,7 +1748,7 @@ func (c *ProjectsLocationsEnvironmentsPatchCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "updateMask": { - // "description": "Required. A comma-separated list of paths, relative to `Environment`, of\nfields to update.\nFor example, to set the version of scikit-learn to install in the\nenvironment to 0.19.0 and to remove an existing installation of\nnumpy, the `updateMask` parameter would include the following two\n`paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and\n\"config.softwareConfig.pypiPackages.numpy\". The included patch\nenvironment would specify the scikit-learn version as follows:\n\n {\n \"config\":{\n \"softwareConfig\":{\n \"pypiPackages\":{\n \"scikit-learn\":\"==0.19.0\"\n }\n }\n }\n }\n\nNote that in the above example, any existing PyPI packages\nother than scikit-learn and numpy will be unaffected.\n\nOnly one update type may be included in a single request's `updateMask`.\nFor example, one cannot update both the PyPI packages and\nlabels in the same request. However, it is possible to update multiple\nmembers of a map field simultaneously in the same request. For example,\nto set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming\nit already exists), one can\nprovide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\"\nand populate the patch environment as follows:\n\n {\n \"labels\":{\n \"label1\":\"new-label1-value\"\n \"label2\":\"new-label2-value\"\n }\n }\n\nNote that in the above example, any existing labels that are not\nincluded in the `updateMask` will be unaffected.\n\nIt is also possible to replace an entire map field by providing the\nmap field's path in the `updateMask`. The new value of the field will\nbe that which is provided in the patch environment. For example, to\ndelete all pre-existing user-specified PyPI packages and\ninstall botocore at version 1.7.14, the `updateMask` would contain\nthe path \"config.softwareConfig.pypiPackages\", and\nthe patch environment would be the following:\n\n {\n \"config\":{\n \"softwareConfig\":{\n \"pypiPackages\":{\n \"botocore\":\"==1.7.14\"\n }\n }\n }\n }\n\n**Note:** Only the following fields can be updated:\n\n \u003ctable\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cstrong\u003eMask\u003c/strong\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cstrong\u003ePurpose\u003c/strong\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.pypiPackages\n \u003c/td\u003e\n \u003ctd\u003eReplace all custom custom PyPI packages. If a replacement\n package map is not included in `environment`, all custom\n PyPI packages are cleared. It is an error to provide both this mask and a\n mask specifying an individual package.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.pypiPackages.\u003cvar\u003epackagename\u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eUpdate the custom PyPI package \u003cvar\u003epackagename\u003c/var\u003e,\n preserving other packages. To delete the package, include it in\n `updateMask`, and omit the mapping for it in\n `environment.config.softwareConfig.pypiPackages`. It is an error\n to provide both a mask of this form and the\n \"config.softwareConfig.pypiPackages\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003elabels\u003c/td\u003e\n \u003ctd\u003eReplace all environment labels. If a replacement labels map is not\n included in `environment`, all labels are cleared. It is an error to\n provide both this mask and a mask specifying one or more individual\n labels.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003elabels.\u003cvar\u003elabelName\u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eSet the label named \u003cvar\u003elabelName\u003c/var\u003e, while preserving other\n labels. To delete the label, include it in `updateMask` and omit its\n mapping in `environment.labels`. It is an error to provide both a\n mask of this form and the \"labels\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.nodeCount\u003c/td\u003e\n \u003ctd\u003eHorizontally scale the number of nodes in the environment. An integer\n greater than or equal to 3 must be provided in the `config.nodeCount` field.\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.airflowConfigOverrides\u003c/td\u003e\n \u003ctd\u003eReplace all Apache Airflow config overrides. If a replacement config\n overrides map is not included in `environment`, all config overrides\n are cleared.\n It is an error to provide both this mask and a mask specifying one or\n more individual config overrides.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.airflowConfigOverrides.\u003cvar\u003esection\u003c/var\u003e-\u003cvar\u003ename\n \u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eOverride the Apache Airflow config property \u003cvar\u003ename\u003c/var\u003e in the\n section named \u003cvar\u003esection\u003c/var\u003e, preserving other properties. To delete\n the property override, include it in `updateMask` and omit its mapping\n in `environment.config.softwareConfig.airflowConfigOverrides`.\n It is an error to provide both a mask of this form and the\n \"config.softwareConfig.airflowConfigOverrides\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.envVariables\u003c/td\u003e\n \u003ctd\u003eReplace all environment variables. If a replacement environment\n variable map is not included in `environment`, all custom environment\n variables are cleared.\n It is an error to provide both this mask and a mask specifying one or\n more individual environment variables.\u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e", + // "description": "Required. A comma-separated list of paths, relative to `Environment`, of\nfields to update.\nFor example, to set the version of scikit-learn to install in the\nenvironment to 0.19.0 and to remove an existing installation of\nnumpy, the `updateMask` parameter would include the following two\n`paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and\n\"config.softwareConfig.pypiPackages.numpy\". The included patch\nenvironment would specify the scikit-learn version as follows:\n\n {\n \"config\":{\n \"softwareConfig\":{\n \"pypiPackages\":{\n \"scikit-learn\":\"==0.19.0\"\n }\n }\n }\n }\n\nNote that in the above example, any existing PyPI packages\nother than scikit-learn and numpy will be unaffected.\n\nOnly one update type may be included in a single request's `updateMask`.\nFor example, one cannot update both the PyPI packages and\nlabels in the same request. However, it is possible to update multiple\nmembers of a map field simultaneously in the same request. For example,\nto set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming\nit already exists), one can\nprovide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\"\nand populate the patch environment as follows:\n\n {\n \"labels\":{\n \"label1\":\"new-label1-value\"\n \"label2\":\"new-label2-value\"\n }\n }\n\nNote that in the above example, any existing labels that are not\nincluded in the `updateMask` will be unaffected.\n\nIt is also possible to replace an entire map field by providing the\nmap field's path in the `updateMask`. The new value of the field will\nbe that which is provided in the patch environment. For example, to\ndelete all pre-existing user-specified PyPI packages and\ninstall botocore at version 1.7.14, the `updateMask` would contain\nthe path \"config.softwareConfig.pypiPackages\", and\nthe patch environment would be the following:\n\n {\n \"config\":{\n \"softwareConfig\":{\n \"pypiPackages\":{\n \"botocore\":\"==1.7.14\"\n }\n }\n }\n }\n\n**Note:** Only the following fields can be updated:\n\n \u003ctable\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cstrong\u003eMask\u003c/strong\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cstrong\u003ePurpose\u003c/strong\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.pypiPackages\n \u003c/td\u003e\n \u003ctd\u003eReplace all custom custom PyPI packages. If a replacement\n package map is not included in `environment`, all custom\n PyPI packages are cleared. It is an error to provide both this mask and a\n mask specifying an individual package.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.pypiPackages.\u003cvar\u003epackagename\u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eUpdate the custom PyPI package \u003cvar\u003epackagename\u003c/var\u003e,\n preserving other packages. To delete the package, include it in\n `updateMask`, and omit the mapping for it in\n `environment.config.softwareConfig.pypiPackages`. It is an error\n to provide both a mask of this form and the\n \"config.softwareConfig.pypiPackages\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003elabels\u003c/td\u003e\n \u003ctd\u003eReplace all environment labels. If a replacement labels map is not\n included in `environment`, all labels are cleared. It is an error to\n provide both this mask and a mask specifying one or more individual\n labels.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003elabels.\u003cvar\u003elabelName\u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eSet the label named \u003cvar\u003elabelName\u003c/var\u003e, while preserving other\n labels. To delete the label, include it in `updateMask` and omit its\n mapping in `environment.labels`. It is an error to provide both a\n mask of this form and the \"labels\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.nodeCount\u003c/td\u003e\n \u003ctd\u003eHorizontally scale the number of nodes in the environment. An integer\n greater than or equal to 3 must be provided in the `config.nodeCount` field.\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.airflowConfigOverrides\u003c/td\u003e\n \u003ctd\u003eReplace all Apache Airflow config overrides. If a replacement config\n overrides map is not included in `environment`, all config overrides\n are cleared.\n It is an error to provide both this mask and a mask specifying one or\n more individual config overrides.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.properties.\u003cvar\u003esection\u003c/var\u003e-\u003cvar\u003ename\n \u003c/var\u003e\u003c/td\u003e\n \u003ctd\u003eOverride the Apache Airflow property \u003cvar\u003ename\u003c/var\u003e in the section\n named \u003cvar\u003esection\u003c/var\u003e, preserving other properties. To delete the\n property override, include it in `updateMask` and omit its mapping\n in `environment.config.softwareConfig.properties`.\n It is an error to provide both a mask of this form and the\n \"config.softwareConfig.properties\" mask.\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd\u003econfig.softwareConfig.envVariables\u003c/td\u003e\n \u003ctd\u003eReplace all environment variables. If a replacement environment\n variable map is not included in `environment`, all custom environment\n variables are cleared.\n It is an error to provide both this mask and a mask specifying one or\n more individual environment variables.\u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -1849,13 +1824,9 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1996,13 +1967,9 @@ func (c *ProjectsLocationsOperationsGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2176,13 +2143,9 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, diff --git a/vendor/google.golang.org/api/compute/v0.beta/compute-api.json b/vendor/google.golang.org/api/compute/v0.beta/compute-api.json index 0aabc2a6..ae4ffc1f 100644 --- a/vendor/google.golang.org/api/compute/v0.beta/compute-api.json +++ b/vendor/google.golang.org/api/compute/v0.beta/compute-api.json @@ -29,7 +29,7 @@ "description": "Creates and runs virtual machines on Google Cloud Platform.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/Gv1-JABGeCvkbre_T9kT5q8a9Io\"", + "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/yY5Jnalk5wiipt_KVhW0auCsLwU\"", "icons": { "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" @@ -6976,7 +6976,7 @@ "instance": { "description": "Name of the instance resource to return.", "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" }, @@ -7005,58 +7005,6 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "getGuestAttributes": { - "description": "Returns the specified guest attributes entry.", - "httpMethod": "GET", - "id": "compute.instances.getGuestAttributes", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "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", - "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" - }, - "queryPath": { - "description": "Specifies the guest attributes path to be queried.", - "location": "query", - "type": "string" - }, - "variableKey": { - "description": "Specifies the key for the guest attributes entry.", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/zones/{zone}/instances/{instance}/getGuestAttributes", - "response": { - "$ref": "GuestAttributes" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, "getIamPolicy": { "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", "httpMethod": "GET", @@ -7156,48 +7104,6 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "getShieldedVmIdentity": { - "description": "Returns the Shielded VM Identity of an instance", - "httpMethod": "GET", - "id": "compute.instances.getShieldedVmIdentity", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "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", - "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": "{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity", - "response": { - "$ref": "ShieldedVmIdentity" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, "insert": { "description": "Creates an instance resource in the specified project using the data included in the request.", "httpMethod": "POST", @@ -7220,7 +7126,7 @@ "type": "string" }, "sourceInstanceTemplate": { - "description": "Specifies instance template to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: \n- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate \n- projects/project/global/instanceTemplates/instanceTemplate \n- global/instanceTemplates/instanceTemplate", + "description": "Specifies instance template to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: \n- https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate \n- projects/project/global/global/instanceTemplates/instanceTemplate \n- global/instancesTemplates/instanceTemplate", "location": "query", "type": "string" }, @@ -8943,40 +8849,6 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "getDiagnostics": { - "description": "Returns the interconnectDiagnostics for the specified interconnect.", - "httpMethod": "GET", - "id": "compute.interconnects.getDiagnostics", - "parameterOrder": [ - "project", - "interconnect" - ], - "parameters": { - "interconnect": { - "description": "Name of the interconnect resource to query.", - "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", - "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": "{project}/global/interconnects/{interconnect}/getDiagnostics", - "response": { - "$ref": "InterconnectsGetDiagnosticsResponse" - }, - "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 Interconnect in the specified project using the data included in the request.", "httpMethod": "POST", @@ -14802,7 +14674,7 @@ }, "path": "{project}/regions/{region}/resourcePolicies", "response": { - "$ref": "ResourcePolicyList" + "$ref": "ResourcePoliciesList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -14996,71 +14868,6 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "getNatMappingInfo": { - "description": "Retrieves runtime Nat mapping information of VM endpoints.", - "httpMethod": "GET", - "id": "compute.routers.getNatMappingInfo", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou 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.\n\nTo 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).", - "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.\n\nYou 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.\n\nCurrently, 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" - }, - "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" - }, - "router": { - "description": "Name of the Router resource to query for Nat Mapping information of VM endpoints.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{project}/regions/{region}/routers/{router}/getNatMappingInfo", - "response": { - "$ref": "VmEndpointNatMappingsList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, "getRouterStatus": { "description": "Retrieves runtime information of the specified router.", "httpMethod": "GET", @@ -15610,11 +15417,6 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "required": true, "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" } }, "path": "{project}/global/securityPolicies/{securityPolicy}/addRule", @@ -15760,11 +15562,6 @@ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" } }, "path": "{project}/global/securityPolicies", @@ -15945,11 +15742,6 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "required": true, "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" } }, "path": "{project}/global/securityPolicies/{securityPolicy}/patchRule", @@ -20693,7 +20485,7 @@ } } }, - "revision": "20181017", + "revision": "20180817", "rootUrl": "https://www.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -25096,7 +24888,7 @@ "id": "ForwardingRule", "properties": { "IPAddress": { - "description": "The IP address that this forwarding rule is serving on behalf of.\n\nAddresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional).\n\nWhen the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6.\n\nWhen the load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL reference to an existing Address resource ( internal regional static IP address), with a purpose of GCE_END_POINT and address_type of INTERNAL.\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule.\n\nAn address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: \n- 100.1.2.3 \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address \n- projects/project/regions/region/addresses/address \n- regions/region/addresses/address \n- global/addresses/address \n- address", + "description": "The IP address that this forwarding rule is serving on behalf of.\n\nAddresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional).\n\nWhen the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6.\n\nWhen the load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL reference to an existing Address resource ( internal regional static IP address).\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule.\n\nAn address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: \n- 100.1.2.3 \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address \n- projects/project/regions/region/addresses/address \n- regions/region/addresses/address \n- global/addresses/address \n- address", "type": "string" }, "IPProtocol": { @@ -25608,70 +25400,6 @@ }, "type": "object" }, - "GuestAttributes": { - "description": "A guest attributes entry.", - "id": "GuestAttributes", - "properties": { - "kind": { - "default": "compute#guestAttributes", - "description": "[Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.", - "type": "string" - }, - "queryPath": { - "description": "The path to be queried. This can be the default namespace ('/') or a nested namespace ('//') or a specified key ('//')", - "type": "string" - }, - "queryValue": { - "$ref": "GuestAttributesValue", - "description": "[Output Only] The value of the requested queried path." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "variableKey": { - "description": "The key to search for.", - "type": "string" - }, - "variableValue": { - "description": "[Output Only] The value found for the requested key.", - "type": "string" - } - }, - "type": "object" - }, - "GuestAttributesEntry": { - "description": "A guest attributes namespace/key/value entry.", - "id": "GuestAttributesEntry", - "properties": { - "key": { - "description": "Key for the guest attribute entry.", - "type": "string" - }, - "namespace": { - "description": "Namespace for the guest attribute entry.", - "type": "string" - }, - "value": { - "description": "Value for the guest attribute entry.", - "type": "string" - } - }, - "type": "object" - }, - "GuestAttributesValue": { - "description": "Array of guest attribute namespace/key/value tuples.", - "id": "GuestAttributesValue", - "properties": { - "items": { - "items": { - "$ref": "GuestAttributesEntry" - }, - "type": "array" - } - }, - "type": "object" - }, "GuestOsFeature": { "description": "Guest OS features.", "id": "GuestOsFeature", @@ -25927,7 +25655,8 @@ "HTTPS", "INVALID", "SSL", - "TCP" + "TCP", + "UDP" ], "enumDescriptions": [ "", @@ -25935,10 +25664,14 @@ "", "", "", + "", "" ], "type": "string" }, + "udpHealthCheck": { + "$ref": "UDPHealthCheck" + }, "unhealthyThreshold": { "description": "A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.", "format": "int32", @@ -27484,10 +27217,6 @@ "description": "The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.", "type": "string" }, - "status": { - "$ref": "InstanceGroupManagerStatus", - "description": "[Output Only] The status of this managed instance group." - }, "targetPools": { "description": "The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.", "items": { @@ -27841,16 +27570,6 @@ }, "type": "object" }, - "InstanceGroupManagerStatus": { - "id": "InstanceGroupManagerStatus", - "properties": { - "isStable": { - "description": "[Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.", - "type": "boolean" - } - }, - "type": "object" - }, "InstanceGroupManagerUpdatePolicy": { "id": "InstanceGroupManagerUpdatePolicy", "properties": { @@ -29805,129 +29524,6 @@ }, "type": "object" }, - "InterconnectDiagnostics": { - "description": "Diagnostics information about interconnect, contains detailed and current technical information about Google?s side of the connection.", - "id": "InterconnectDiagnostics", - "properties": { - "arpCaches": { - "description": "A list of InterconnectDiagnostics.ARPEntry objects, describing individual neighbors currently seen by the Google router in the ARP cache for the Interconnect. This will be empty when the Interconnect is not bundled.", - "items": { - "$ref": "InterconnectDiagnosticsARPEntry" - }, - "type": "array" - }, - "links": { - "description": "A list of InterconnectDiagnostics.LinkStatus objects, describing the status for each link on the Interconnect.", - "items": { - "$ref": "InterconnectDiagnosticsLinkStatus" - }, - "type": "array" - }, - "macAddress": { - "description": "The MAC address of the Interconnect's bundle interface.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectDiagnosticsARPEntry": { - "description": "Describing the ARP neighbor entries seen on this link", - "id": "InterconnectDiagnosticsARPEntry", - "properties": { - "ipAddress": { - "description": "The IP address of this ARP neighbor.", - "type": "string" - }, - "macAddress": { - "description": "The MAC address of this ARP neighbor.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectDiagnosticsLinkLACPStatus": { - "id": "InterconnectDiagnosticsLinkLACPStatus", - "properties": { - "googleSystemId": { - "description": "System ID of the port on Google?s side of the LACP exchange.", - "type": "string" - }, - "neighborSystemId": { - "description": "System ID of the port on the neighbor?s side of the LACP exchange.", - "type": "string" - }, - "state": { - "enum": [ - "ACTIVE", - "DETACHED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectDiagnosticsLinkOpticalPower": { - "id": "InterconnectDiagnosticsLinkOpticalPower", - "properties": { - "state": { - "enum": [ - "HIGH_ALARM", - "HIGH_WARNING", - "LOW_ALARM", - "LOW_WARNING", - "OK" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "value": { - "description": "Value of the current optical power, read in dBm.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "InterconnectDiagnosticsLinkStatus": { - "id": "InterconnectDiagnosticsLinkStatus", - "properties": { - "arpCaches": { - "description": "A list of InterconnectDiagnostics.ARPEntry objects, describing the ARP neighbor entries seen on this link. This will be empty if the link is bundled", - "items": { - "$ref": "InterconnectDiagnosticsARPEntry" - }, - "type": "array" - }, - "circuitId": { - "description": "The unique ID for this link assigned during turn up by Google.", - "type": "string" - }, - "googleDemarc": { - "description": "The Demarc address assigned by Google and provided in the LoA.", - "type": "string" - }, - "lacpStatus": { - "$ref": "InterconnectDiagnosticsLinkLACPStatus" - }, - "receivingOpticalPower": { - "$ref": "InterconnectDiagnosticsLinkOpticalPower" - }, - "transmittingOpticalPower": { - "$ref": "InterconnectDiagnosticsLinkOpticalPower" - } - }, - "type": "object" - }, "InterconnectList": { "description": "Response to the list request, and contains a list of interconnects.", "id": "InterconnectList", @@ -30352,16 +29948,6 @@ }, "type": "object" }, - "InterconnectsGetDiagnosticsResponse": { - "description": "Response for the InterconnectsGetDiagnosticsRequest.", - "id": "InterconnectsGetDiagnosticsResponse", - "properties": { - "result": { - "$ref": "InterconnectDiagnostics" - } - }, - "type": "object" - }, "License": { "description": "A license resource.", "id": "License", @@ -30399,7 +29985,7 @@ "compute.images.insert" ] }, - "description": "Name of the resource. The name must be 1-63 characters long and comply with RFC1035.", + "description": "[Output Only] Name of the resource. The name is 1-63 characters long and complies with RFC1035.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, @@ -30665,7 +30251,7 @@ "type": "object" }, "LogConfigCounterOptions": { - "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nSupported field names: - \"authority\", which is \"[token]\" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - \"iam_principal\", a representation of IAMContext.principal even if a token or authority selector is present; or - \"\" (empty string), resulting in a counter with no fields.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support multiple field names (though this may be supported in the future).", + "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nAt present the only supported field names are - \"iam_principal\", corresponding to IAMContext.principal; - \"\" (empty string), resulting in one aggretated counter with no field.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support: * multiple field names (though this may be supported in the future) * decrementing the counter * incrementing it by anything other than 1", "id": "LogConfigCounterOptions", "properties": { "field": { @@ -31267,7 +30853,7 @@ "type": "object" }, "Network": { - "description": "Represents a Network resource. Read Virtual Private Cloud (VPC) Network Overview for more information. (== resource_for v1.networks ==) (== resource_for beta.networks ==)", + "description": "Represents a Network resource. Read Networks and Firewalls for more information. (== resource_for v1.networks ==) (== resource_for beta.networks ==)", "id": "Network", "properties": { "IPv4Range": { @@ -31276,7 +30862,7 @@ "type": "string" }, "autoCreateSubnetworks": { - "description": "When set to true, the VPC network is created in \"auto\" mode. When set to false, the VPC network is created in \"custom\" mode.\n\nAn auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described in Auto mode VPC network IP ranges.", + "description": "When set to true, the network is created in \"auto subnet mode\". When set to false, the network is in \"custom subnet mode\".\n\nIn \"auto subnet mode\", a newly created network is assigned the default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork per region.", "type": "boolean" }, "creationTimestamp": { @@ -31288,7 +30874,7 @@ "type": "string" }, "gatewayIPv4": { - "description": "[Output Only] The gateway address for default routing out of the network. This value is read only and is selected by GCP.", + "description": "A gateway address for default routing to other networks. This value is read only and is selected by the Google Compute Engine, typically as the first usable address in the IPv4Range.", "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}", "type": "string" }, @@ -31328,7 +30914,7 @@ "type": "string" }, "subnetworks": { - "description": "[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network.", + "description": "[Output Only] Server-defined fully-qualified URLs for all subnetworks in this network.", "items": { "type": "string" }, @@ -31365,11 +30951,6 @@ "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" }, - "defaultPort": { - "description": "The default port used if the port number is not specified in the network endpoint.", - "format": "int32", - "type": "integer" - }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" @@ -31386,16 +30967,12 @@ }, "loadBalancer": { "$ref": "NetworkEndpointGroupLbNetworkEndpointGroup", - "description": "This field is only valid when the network endpoint group is used for load balancing. [Deprecated] This field is deprecated." + "description": "This field is only valid when the network endpoint group is used for load balancing." }, "name": { "description": "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.", "type": "string" }, - "network": { - "description": "The URL of the network to which all network endpoints in the NEG belong. Uses \"default\" project network if unspecified.", - "type": "string" - }, "networkEndpointType": { "description": "Type of network endpoints in this network endpoint group. Currently the only supported value is GCE_VM_IP_PORT.", "enum": [ @@ -31414,14 +30991,6 @@ "description": "[Output only] Number of network endpoints in the network endpoint group.", "format": "int32", "type": "integer" - }, - "subnetwork": { - "description": "Optional URL of the subnetwork to which all network endpoints in the NEG belong.", - "type": "string" - }, - "zone": { - "description": "[Output Only] The URL of the zone where the network endpoint group is located.", - "type": "string" } }, "type": "object" @@ -31543,20 +31112,20 @@ "id": "NetworkEndpointGroupLbNetworkEndpointGroup", "properties": { "defaultPort": { - "description": "The default port used if the port number is not specified in the network endpoint. [Deprecated] This field is deprecated.", + "description": "The default port used if the port number is not specified in the network endpoint.", "format": "int32", "type": "integer" }, "network": { - "description": "The URL of the network to which all network endpoints in the NEG belong. Uses \"default\" project network if unspecified. [Deprecated] This field is deprecated.", + "description": "The URL of the network to which all network endpoints in the NEG belong. Uses \"default\" project network if unspecified.", "type": "string" }, "subnetwork": { - "description": "Optional URL of the subnetwork to which all network endpoints in the NEG belong. [Deprecated] This field is deprecated.", + "description": "Optional URL of the subnetwork to which all network endpoints in the NEG belong.", "type": "string" }, "zone": { - "description": "[Output Only] The URL of the zone where the network endpoint group is located. [Deprecated] This field is deprecated.", + "description": "[Output Only] The URL of the zone where the network endpoint group is located.", "type": "string" } }, @@ -32134,7 +31703,7 @@ "id": "NetworkRoutingConfig", "properties": { "routingMode": { - "description": "The network-wide routing mode to use. If set to REGIONAL, this network's cloud routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's cloud routers will advertise routes with all subnets of this network, across regions.", + "description": "The network-wide routing mode to use. If set to REGIONAL, this network's cloud routers will only advertise routes with subnetworks of this network in the same region as the router. If set to GLOBAL, this network's cloud routers will advertise routes with all subnetworks of this network, across regions.", "enum": [ "GLOBAL", "REGIONAL" @@ -32211,6 +31780,13 @@ "description": "The URL of the node template to which this node group belongs.", "type": "string" }, + "nodes": { + "description": "[Deprecated] Use nodeGroups.listNodes instead. [Output Only] A list of nodes in this node group.", + "items": { + "$ref": "NodeGroupNode" + }, + "type": "array" + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" @@ -34332,7 +33908,6 @@ "DISKS_TOTAL_GB", "FIREWALLS", "FORWARDING_RULES", - "GLOBAL_INTERNAL_ADDRESSES", "GPUS_ALL_REGIONS", "HEALTH_CHECKS", "IMAGES", @@ -34354,8 +33929,6 @@ "NVIDIA_P100_VWS_GPUS", "NVIDIA_P4_GPUS", "NVIDIA_P4_VWS_GPUS", - "NVIDIA_T4_GPUS", - "NVIDIA_T4_VWS_GPUS", "NVIDIA_V100_GPUS", "PREEMPTIBLE_CPUS", "PREEMPTIBLE_LOCAL_SSD_GB", @@ -34364,8 +33937,6 @@ "PREEMPTIBLE_NVIDIA_P100_VWS_GPUS", "PREEMPTIBLE_NVIDIA_P4_GPUS", "PREEMPTIBLE_NVIDIA_P4_VWS_GPUS", - "PREEMPTIBLE_NVIDIA_T4_GPUS", - "PREEMPTIBLE_NVIDIA_T4_VWS_GPUS", "PREEMPTIBLE_NVIDIA_V100_GPUS", "REGIONAL_AUTOSCALERS", "REGIONAL_INSTANCE_GROUP_MANAGERS", @@ -34449,11 +34020,6 @@ "", "", "", - "", - "", - "", - "", - "", "" ], "type": "string" @@ -35473,6 +35039,120 @@ }, "type": "object" }, + "ResourcePoliciesList": { + "id": "ResourcePoliciesList", + "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 ResourcePolicy resources.", + "items": { + "$ref": "ResourcePolicy" + }, + "type": "array" + }, + "kind": { + "default": "compute#resourcePoliciesList", + "description": "[Output Only] Type of resource.Always compute#resourcePoliciesList for listsof resourcePolicies", + "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" + }, + "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", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"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" + }, "ResourcePoliciesScopedList": { "id": "ResourcePoliciesScopedList", "properties": { @@ -35839,120 +35519,6 @@ }, "type": "object" }, - "ResourcePolicyList": { - "id": "ResourcePolicyList", - "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 ResourcePolicy resources.", - "items": { - "$ref": "ResourcePolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#resourcePolicyList", - "description": "[Output Only] Type of resource.Always compute#resourcePoliciesList for listsof resourcePolicies", - "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" - }, - "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", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"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" - }, "ResourcePolicyWeeklyCycle": { "description": "Time window specified for weekly operations.", "id": "ResourcePolicyWeeklyCycle", @@ -36354,13 +35920,6 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, - "nats": { - "description": "A list of Nat services created in this router.", - "items": { - "$ref": "RouterNat" - }, - "type": "array" - }, "network": { "annotations": { "required": [ @@ -36776,118 +36335,6 @@ }, "type": "object" }, - "RouterNat": { - "description": "Represents a Nat resource. It enables the VMs within the specified subnetworks to access Internet without external IP addresses. It specifies a list of subnetworks (and the ranges within) that want to use NAT. Customers can also provide the external IPs that would be used for NAT. GCP would auto-allocate ephemeral IPs if no external IPs are provided.", - "id": "RouterNat", - "properties": { - "icmpIdleTimeoutSec": { - "description": "Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.", - "format": "int32", - "type": "integer" - }, - "minPortsPerVm": { - "description": "Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. This gets rounded up to the nearest power of 2. Eg. if the value of this field is 50, at least 64 ports will be allocated to a VM.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "Unique name of this Nat service. The name must be 1-63 characters long and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "natIpAllocateOption": { - "description": "Specify the NatIpAllocateOption. If it is AUTO_ONLY, then nat_ip should be empty.", - "enum": [ - "AUTO_ONLY", - "MANUAL_ONLY" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "natIps": { - "description": "A list of URLs of the IP resources used for this Nat service. These IPs must be valid static external IP addresses assigned to the project. max_length is subject to change post alpha.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceSubnetworkIpRangesToNat": { - "description": "Specify the Nat option. If this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other Router.Nat section in any Router for this network in this region.", - "enum": [ - "ALL_SUBNETWORKS_ALL_IP_RANGES", - "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES", - "LIST_OF_SUBNETWORKS" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "subnetworks": { - "description": "A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the SubnetworkIpRangeToNatOption above.", - "items": { - "$ref": "RouterNatSubnetworkToNat" - }, - "type": "array" - }, - "tcpEstablishedIdleTimeoutSec": { - "description": "Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.", - "format": "int32", - "type": "integer" - }, - "tcpTransitoryIdleTimeoutSec": { - "description": "Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.", - "format": "int32", - "type": "integer" - }, - "udpIdleTimeoutSec": { - "description": "Timeout (in seconds) for UDP connections. Defaults to 30s if not set.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "RouterNatSubnetworkToNat": { - "description": "Defines the IP ranges that want to use NAT for a subnetwork.", - "id": "RouterNatSubnetworkToNat", - "properties": { - "name": { - "description": "URL for the subnetwork resource to use NAT.", - "type": "string" - }, - "secondaryIpRangeNames": { - "description": "A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if \"LIST_OF_SECONDARY_IP_RANGES\" is one of the values in source_ip_ranges_to_nat.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceIpRangesToNat": { - "description": "Specify the options for NAT ranges in the Subnetwork. All usages of single value are valid except NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with multiple values is: [\"PRIMARY_IP_RANGE\", \"LIST_OF_SECONDARY_IP_RANGES\"] Default: [ALL_IP_RANGES]", - "items": { - "enum": [ - "ALL_IP_RANGES", - "LIST_OF_SECONDARY_IP_RANGES", - "PRIMARY_IP_RANGE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "RouterStatus": { "id": "RouterStatus", "properties": { @@ -36911,12 +36358,6 @@ }, "type": "array" }, - "natStatus": { - "items": { - "$ref": "RouterStatusNatStatus" - }, - "type": "array" - }, "network": { "description": "URI of the network to which this router belongs.", "type": "string" @@ -36984,48 +36425,6 @@ }, "type": "object" }, - "RouterStatusNatStatus": { - "description": "Status of a NAT contained in this router.", - "id": "RouterStatusNatStatus", - "properties": { - "autoAllocatedNatIps": { - "description": "A list of IPs auto-allocated for NAT. Example: [\"1.1.1.1\", \"129.2.16.89\"]", - "items": { - "type": "string" - }, - "type": "array" - }, - "minExtraNatIpsNeeded": { - "description": "The number of extra IPs to allocate. This will be greater than 0 only if user-specified IPs are NOT enough to allow all configured VMs to use NAT. This value is meaningful only when auto-allocation of NAT IPs is *not* used.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "Unique name of this NAT.", - "type": "string" - }, - "numVmEndpointsWithNatMappings": { - "description": "Number of VM endpoints (i.e., Nics) that can use NAT.", - "format": "int32", - "type": "integer" - }, - "userAllocatedNatIpResources": { - "description": "A list of fully qualified URLs of reserved IP address resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "userAllocatedNatIps": { - "description": "A list of IPs user-allocated for NAT. They will be raw IP strings like \"179.12.26.133\".", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "RouterStatusResponse": { "id": "RouterStatusResponse", "properties": { @@ -37662,37 +37061,6 @@ }, "type": "object" }, - "ShieldedVmIdentity": { - "description": "A shielded VM identity entry.", - "id": "ShieldedVmIdentity", - "properties": { - "encryptionKey": { - "$ref": "ShieldedVmIdentityEntry" - }, - "kind": { - "default": "compute#shieldedVmIdentity", - "description": "[Output Only] Type of the resource. Always compute#shieldedVmIdentity for shielded VM identity entry.", - "type": "string" - }, - "signingKey": { - "$ref": "ShieldedVmIdentityEntry" - } - }, - "type": "object" - }, - "ShieldedVmIdentityEntry": { - "description": "A Shielded VM Identity Entry.", - "id": "ShieldedVmIdentityEntry", - "properties": { - "ekCert": { - "type": "string" - }, - "ekPub": { - "type": "string" - } - }, - "type": "object" - }, "ShieldedVmIntegrityPolicy": { "description": "The policy describes the baseline against which VM instance boot integrity is measured.", "id": "ShieldedVmIntegrityPolicy", @@ -38552,7 +37920,7 @@ "type": "string" }, "enableFlowLogs": { - "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is to disable flow logging.", + "description": "Whether to enable flow logging for this subnetwork.", "type": "boolean" }, "fingerprint": { @@ -41092,6 +40460,29 @@ }, "type": "object" }, + "UDPHealthCheck": { + "id": "UDPHealthCheck", + "properties": { + "port": { + "description": "The UDP port number for the health check request. Valid values are 1 through 65535.", + "format": "int32", + "type": "integer" + }, + "portName": { + "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.", + "type": "string" + }, + "request": { + "description": "Raw data of request to send in payload of UDP packet. It is an error if this is empty. The request data can only be ASCII.", + "type": "string" + }, + "response": { + "description": "The bytes to match against the beginning of the response data. It is an error if this is empty. The response data can only be ASCII.", + "type": "string" + } + }, + "type": "object" + }, "UrlMap": { "description": "A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the \"longest-match\" of the URL's host and path.", "id": "UrlMap", @@ -41513,162 +40904,6 @@ }, "type": "object" }, - "VmEndpointNatMappings": { - "description": "Contain information of Nat mapping for a VM endpoint (i.e., NIC).", - "id": "VmEndpointNatMappings", - "properties": { - "instanceName": { - "description": "Name of the VM instance which the endpoint belongs to", - "type": "string" - }, - "interfaceNatMappings": { - "items": { - "$ref": "VmEndpointNatMappingsInterfaceNatMappings" - }, - "type": "array" - } - }, - "type": "object" - }, - "VmEndpointNatMappingsInterfaceNatMappings": { - "description": "Contain information of Nat mapping for an interface of this endpoint.", - "id": "VmEndpointNatMappingsInterfaceNatMappings", - "properties": { - "natIpPortRanges": { - "description": "A list of all IP:port-range mappings assigned to this interface. These ranges are inclusive, that is, both the first and the last ports can be used for NAT. Example: [\"2.2.2.2:12345-12355\", \"1.1.1.1:2234-2234\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "numTotalNatPorts": { - "description": "Total number of ports across all NAT IPs allocated to this interface. It equals to the aggregated port number in the field nat_ip_port_ranges.", - "format": "int32", - "type": "integer" - }, - "sourceAliasIpRange": { - "description": "Alias IP range for this interface endpoint. It will be a private (RFC 1918) IP range. Examples: \"10.33.4.55/32\", or \"192.168.5.0/24\".", - "type": "string" - }, - "sourceVirtualIp": { - "description": "Primary IP of the VM for this NIC.", - "type": "string" - } - }, - "type": "object" - }, - "VmEndpointNatMappingsList": { - "description": "Contains a list of VmEndpointNatMappings.", - "id": "VmEndpointNatMappingsList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "type": "string" - }, - "kind": { - "default": "compute#vmEndpointNatMappingsList", - "description": "[Output Only] Type of resource. Always compute#vmEndpointNatMappingsList for lists of Nat mappings of VM endpoints.", - "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" - }, - "result": { - "description": "[Output Only] A list of Nat mapping information of VM endpoints.", - "items": { - "$ref": "VmEndpointNatMappings" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "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", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"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" - }, "VpnTunnel": { "description": "VPN tunnel resource. (== resource_for beta.vpnTunnels ==) (== resource_for v1.vpnTunnels ==)", "id": "VpnTunnel", diff --git a/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go b/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go index b16ed90d..8f92316c 100644 --- a/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -7426,8 +7425,7 @@ type ForwardingRule struct { // // When the load balancing scheme is INTERNAL_SELF_MANAGED, this must be // a URL reference to an existing Address resource ( internal regional - // static IP address), with a purpose of GCE_END_POINT and address_type - // of INTERNAL. + // static IP address). // // When the load balancing scheme is INTERNAL, this can only be an RFC // 1918 IP address belonging to the network/subnet configured for the @@ -8219,117 +8217,6 @@ func (s *GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) { 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"` - - // 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"` - - // 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. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GuestAttributes) MarshalJSON() ([]byte, error) { - type NoMethod GuestAttributes - 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"` - - // Namespace: Namespace for the guest attribute entry. - Namespace string `json:"namespace,omitempty"` - - // Value: Value for the guest attribute entry. - 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 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 *GuestAttributesEntry) MarshalJSON() ([]byte, error) { - type NoMethod GuestAttributesEntry - 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"` - - // ForceSendFields is a list of field names (e.g. "Items") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GuestAttributesValue) MarshalJSON() ([]byte, error) { - type NoMethod GuestAttributesValue - 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. Read Enabling guest operating @@ -8679,8 +8566,11 @@ type HealthCheck struct { // "INVALID" // "SSL" // "TCP" + // "UDP" Type string `json:"type,omitempty"` + UdpHealthCheck *UDPHealthCheck `json:"udpHealthCheck,omitempty"` + // UnhealthyThreshold: A so-far healthy instance will be marked // unhealthy after this many consecutive failures. The default value is // 2. @@ -10753,9 +10643,6 @@ type InstanceGroupManager struct { // {projectNumber}@cloudservices.gserviceaccount.com is used. ServiceAccount string `json:"serviceAccount,omitempty"` - // Status: [Output Only] The status of this managed instance group. - Status *InstanceGroupManagerStatus `json:"status,omitempty"` - // TargetPools: The URLs for all TargetPool resources to which instances // in the instanceGroup field are added. The target pools automatically // apply to all of the instances in the managed instance group. @@ -11282,38 +11169,6 @@ func (s *InstanceGroupManagerPendingActionsSummary) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InstanceGroupManagerStatus struct { - // IsStable: [Output Only] A bit indicating whether the managed instance - // group is in a stable state. A stable state means that: none of the - // instances in the managed instance group is currently undergoing any - // type of change (for example, creation, restart, or deletion); no - // future changes are scheduled for instances in the managed instance - // group; and the managed instance group itself is not being modified. - IsStable bool `json:"isStable,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IsStable") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IsStable") 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 *InstanceGroupManagerStatus) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - type InstanceGroupManagerUpdatePolicy struct { // MaxSurge: The maximum number of instances that can be created above // the specified targetSize during the update process. By default, a @@ -14268,208 +14123,6 @@ func (s *InterconnectCircuitInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectDiagnostics: Diagnostics information about interconnect, -// contains detailed and current technical information about Google?s -// side of the connection. -type InterconnectDiagnostics struct { - // ArpCaches: A list of InterconnectDiagnostics.ARPEntry objects, - // describing individual neighbors currently seen by the Google router - // in the ARP cache for the Interconnect. This will be empty when the - // Interconnect is not bundled. - ArpCaches []*InterconnectDiagnosticsARPEntry `json:"arpCaches,omitempty"` - - // Links: A list of InterconnectDiagnostics.LinkStatus objects, - // describing the status for each link on the Interconnect. - Links []*InterconnectDiagnosticsLinkStatus `json:"links,omitempty"` - - // MacAddress: The MAC address of the Interconnect's bundle interface. - MacAddress string `json:"macAddress,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArpCaches") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ArpCaches") 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 *InterconnectDiagnostics) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnostics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InterconnectDiagnosticsARPEntry: Describing the ARP neighbor entries -// seen on this link -type InterconnectDiagnosticsARPEntry struct { - // IpAddress: The IP address of this ARP neighbor. - IpAddress string `json:"ipAddress,omitempty"` - - // MacAddress: The MAC address of this ARP neighbor. - MacAddress string `json:"macAddress,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpAddress") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpAddress") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectDiagnosticsARPEntry) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsARPEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InterconnectDiagnosticsLinkLACPStatus struct { - // GoogleSystemId: System ID of the port on Google?s side of the LACP - // exchange. - GoogleSystemId string `json:"googleSystemId,omitempty"` - - // NeighborSystemId: System ID of the port on the neighbor?s side of the - // LACP exchange. - NeighborSystemId string `json:"neighborSystemId,omitempty"` - - // Possible values: - // "ACTIVE" - // "DETACHED" - State string `json:"state,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GoogleSystemId") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GoogleSystemId") 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 *InterconnectDiagnosticsLinkLACPStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsLinkLACPStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InterconnectDiagnosticsLinkOpticalPower struct { - // Possible values: - // "HIGH_ALARM" - // "HIGH_WARNING" - // "LOW_ALARM" - // "LOW_WARNING" - // "OK" - State string `json:"state,omitempty"` - - // Value: Value of the current optical power, read in dBm. - Value float64 `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "State") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "State") 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 *InterconnectDiagnosticsLinkOpticalPower) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsLinkOpticalPower - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *InterconnectDiagnosticsLinkOpticalPower) UnmarshalJSON(data []byte) error { - type NoMethod InterconnectDiagnosticsLinkOpticalPower - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -type InterconnectDiagnosticsLinkStatus struct { - // ArpCaches: A list of InterconnectDiagnostics.ARPEntry objects, - // describing the ARP neighbor entries seen on this link. This will be - // empty if the link is bundled - ArpCaches []*InterconnectDiagnosticsARPEntry `json:"arpCaches,omitempty"` - - // CircuitId: The unique ID for this link assigned during turn up by - // Google. - CircuitId string `json:"circuitId,omitempty"` - - // GoogleDemarc: The Demarc address assigned by Google and provided in - // the LoA. - GoogleDemarc string `json:"googleDemarc,omitempty"` - - LacpStatus *InterconnectDiagnosticsLinkLACPStatus `json:"lacpStatus,omitempty"` - - ReceivingOpticalPower *InterconnectDiagnosticsLinkOpticalPower `json:"receivingOpticalPower,omitempty"` - - TransmittingOpticalPower *InterconnectDiagnosticsLinkOpticalPower `json:"transmittingOpticalPower,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ArpCaches") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ArpCaches") 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 *InterconnectDiagnosticsLinkStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsLinkStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // InterconnectList: Response to the list request, and contains a list // of interconnects. type InterconnectList struct { @@ -15000,38 +14653,6 @@ func (s *InterconnectOutageNotification) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectsGetDiagnosticsResponse: Response for the -// InterconnectsGetDiagnosticsRequest. -type InterconnectsGetDiagnosticsResponse struct { - Result *InterconnectDiagnostics `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Result") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Result") 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 *InterconnectsGetDiagnosticsResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectsGetDiagnosticsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // License: A license resource. type License struct { // ChargesUseFee: [Output Only] Deprecated. This field no longer @@ -15058,8 +14679,8 @@ type License struct { // license to images, snapshots, and disks. LicenseCode uint64 `json:"licenseCode,omitempty,string"` - // Name: Name of the resource. The name must be 1-63 characters long and - // comply with RFC1035. + // Name: [Output Only] Name of the resource. The name is 1-63 characters + // long and complies with RFC1035. Name string `json:"name,omitempty"` ResourceRequirements *LicenseResourceRequirements `json:"resourceRequirements,omitempty"` @@ -15468,21 +15089,18 @@ func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { // Field names correspond to IAM request parameters and field values are // their respective values. // -// Supported field names: - "authority", which is "[token]" if -// IAMContext.token is present, otherwise the value of -// IAMContext.authority_selector if present, and otherwise a -// representation of IAMContext.principal; or - "iam_principal", a -// representation of IAMContext.principal even if a token or authority -// selector is present; or - "" (empty string), resulting in a counter -// with no fields. +// At present the only supported field names are - "iam_principal", +// corresponding to IAMContext.principal; - "" (empty string), resulting +// in one aggretated counter with no field. // // Examples: counter { metric: "/debug_access_count" field: // "iam_principal" } ==> increment counter // /iam/policy/backend_debug_access_count {iam_principal=[value of // IAMContext.principal]} // -// At this time we do not support multiple field names (though this may -// be supported in the future). +// At this time we do not support: * multiple field names (though this +// may be supported in the future) * decrementing the counter * +// incrementing it by anything other than 1 type LogConfigCounterOptions struct { // Field: The field value to attribute. Field string `json:"field,omitempty"` @@ -16404,22 +16022,22 @@ func (s *NamedPort) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Network: Represents a Network resource. Read Virtual Private Cloud -// (VPC) Network Overview for more information. (== resource_for -// v1.networks ==) (== resource_for beta.networks ==) +// Network: Represents a Network resource. Read Networks and Firewalls +// for more information. (== resource_for v1.networks ==) (== +// resource_for beta.networks ==) type Network struct { // IPv4Range: The range of internal addresses that are legal on this // network. This range is a CIDR specification, for example: // 192.168.0.0/16. Provided by the client when the network is created. IPv4Range string `json:"IPv4Range,omitempty"` - // AutoCreateSubnetworks: When set to true, the VPC network is created - // in "auto" mode. When set to false, the VPC network is created in - // "custom" mode. + // AutoCreateSubnetworks: When set to true, the network is created in + // "auto subnet mode". When set to false, the network is in "custom + // subnet mode". // - // An auto mode VPC network starts with one subnet per region. Each - // subnet has a predetermined range as described in Auto mode VPC - // network IP ranges. + // In "auto subnet mode", a newly created network is assigned the + // default CIDR of 10.128.0.0/9 and it automatically creates one + // subnetwork per region. AutoCreateSubnetworks bool `json:"autoCreateSubnetworks,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -16430,8 +16048,9 @@ type Network struct { // property when you create the resource. Description string `json:"description,omitempty"` - // GatewayIPv4: [Output Only] The gateway address for default routing - // out of the network. This value is read only and is selected by GCP. + // GatewayIPv4: A gateway address for default routing to other networks. + // This value is read only and is selected by the Google Compute Engine, + // typically as the first usable address in the IPv4Range. GatewayIPv4 string `json:"gatewayIPv4,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -16463,7 +16082,7 @@ type Network struct { SelfLink string `json:"selfLink,omitempty"` // Subnetworks: [Output Only] Server-defined fully-qualified URLs for - // all subnetworks in this VPC network. + // all subnetworks in this network. Subnetworks []string `json:"subnetworks,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -16544,10 +16163,6 @@ type NetworkEndpointGroup struct { // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DefaultPort: The default port used if the port number is not - // specified in the network endpoint. - DefaultPort int64 `json:"defaultPort,omitempty"` - // Description: An optional description of this resource. Provide this // property when you create the resource. Description string `json:"description,omitempty"` @@ -16561,8 +16176,7 @@ type NetworkEndpointGroup struct { Kind string `json:"kind,omitempty"` // LoadBalancer: This field is only valid when the network endpoint - // group is used for load balancing. [Deprecated] This field is - // deprecated. + // group is used for load balancing. LoadBalancer *NetworkEndpointGroupLbNetworkEndpointGroup `json:"loadBalancer,omitempty"` // Name: Name of the resource; provided by the client when the resource @@ -16574,10 +16188,6 @@ type NetworkEndpointGroup struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // Network: The URL of the network to which all network endpoints in the - // NEG belong. Uses "default" project network if unspecified. - Network string `json:"network,omitempty"` - // NetworkEndpointType: Type of network endpoints in this network // endpoint group. Currently the only supported value is GCE_VM_IP_PORT. // @@ -16592,14 +16202,6 @@ type NetworkEndpointGroup struct { // endpoint group. Size int64 `json:"size,omitempty"` - // Subnetwork: Optional URL of the subnetwork to which all network - // endpoints in the NEG belong. - Subnetwork string `json:"subnetwork,omitempty"` - - // Zone: [Output Only] The URL of the zone where the network endpoint - // group is located. - Zone string `json:"zone,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -16788,21 +16390,19 @@ func (s *NetworkEndpointGroupAggregatedListWarningData) MarshalJSON() ([]byte, e // fields for network endpoint group. type NetworkEndpointGroupLbNetworkEndpointGroup struct { // DefaultPort: The default port used if the port number is not - // specified in the network endpoint. [Deprecated] This field is - // deprecated. + // specified in the network endpoint. DefaultPort int64 `json:"defaultPort,omitempty"` // Network: The URL of the network to which all network endpoints in the // NEG belong. Uses "default" project network if unspecified. - // [Deprecated] This field is deprecated. Network string `json:"network,omitempty"` // Subnetwork: Optional URL of the subnetwork to which all network - // endpoints in the NEG belong. [Deprecated] This field is deprecated. + // endpoints in the NEG belong. Subnetwork string `json:"subnetwork,omitempty"` // Zone: [Output Only] The URL of the zone where the network endpoint - // group is located. [Deprecated] This field is deprecated. + // group is located. Zone string `json:"zone,omitempty"` // ForceSendFields is a list of field names (e.g. "DefaultPort") to @@ -17703,9 +17303,9 @@ func (s *NetworkPeering) MarshalJSON() ([]byte, error) { type NetworkRoutingConfig struct { // RoutingMode: The network-wide routing mode to use. If set to // REGIONAL, this network's cloud routers will only advertise routes - // with subnets of this network in the same region as the router. If set - // to GLOBAL, this network's cloud routers will advertise routes with - // all subnets of this network, across regions. + // with subnetworks of this network in the same region as the router. If + // set to GLOBAL, this network's cloud routers will advertise routes + // with all subnetworks of this network, across regions. // // Possible values: // "GLOBAL" @@ -17832,6 +17432,10 @@ type NodeGroup struct { // belongs. NodeTemplate string `json:"nodeTemplate,omitempty"` + // Nodes: [Deprecated] Use nodeGroups.listNodes instead. [Output Only] A + // list of nodes in this node group. + Nodes []*NodeGroupNode `json:"nodes,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -20910,7 +20514,6 @@ type Quota struct { // "DISKS_TOTAL_GB" // "FIREWALLS" // "FORWARDING_RULES" - // "GLOBAL_INTERNAL_ADDRESSES" // "GPUS_ALL_REGIONS" // "HEALTH_CHECKS" // "IMAGES" @@ -20932,8 +20535,6 @@ type Quota struct { // "NVIDIA_P100_VWS_GPUS" // "NVIDIA_P4_GPUS" // "NVIDIA_P4_VWS_GPUS" - // "NVIDIA_T4_GPUS" - // "NVIDIA_T4_VWS_GPUS" // "NVIDIA_V100_GPUS" // "PREEMPTIBLE_CPUS" // "PREEMPTIBLE_LOCAL_SSD_GB" @@ -20942,8 +20543,6 @@ type Quota struct { // "PREEMPTIBLE_NVIDIA_P100_VWS_GPUS" // "PREEMPTIBLE_NVIDIA_P4_GPUS" // "PREEMPTIBLE_NVIDIA_P4_VWS_GPUS" - // "PREEMPTIBLE_NVIDIA_T4_GPUS" - // "PREEMPTIBLE_NVIDIA_T4_VWS_GPUS" // "PREEMPTIBLE_NVIDIA_V100_GPUS" // "REGIONAL_AUTOSCALERS" // "REGIONAL_INSTANCE_GROUP_MANAGERS" @@ -22569,6 +22168,163 @@ func (s *ResourceGroupReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ResourcePoliciesList struct { + Etag string `json:"etag,omitempty"` + + // 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 ResourcePolicy resources. + Items []*ResourcePolicy `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource.Always + // compute#resourcePoliciesList for listsof resourcePolicies + 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 *ResourcePoliciesListWarning `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 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. "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 + // 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 *ResourcePoliciesList) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePoliciesList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResourcePoliciesListWarning: [Output Only] Informational warning +// message. +type ResourcePoliciesListWarning 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" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + 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 []*ResourcePoliciesListWarningData `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 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 *ResourcePoliciesListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePoliciesListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ResourcePoliciesListWarningData 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 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 *ResourcePoliciesListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePoliciesListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ResourcePoliciesScopedList struct { // ResourcePolicies: A list of resourcePolicies contained in this scope. ResourcePolicies []*ResourcePolicy `json:"resourcePolicies,omitempty"` @@ -23140,163 +22896,6 @@ func (s *ResourcePolicyHourlyCycle) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ResourcePolicyList struct { - Etag string `json:"etag,omitempty"` - - // 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 ResourcePolicy resources. - Items []*ResourcePolicy `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource.Always - // compute#resourcePoliciesList for listsof resourcePolicies - 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 *ResourcePolicyListWarning `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 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. "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 - // 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 *ResourcePolicyList) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyListWarning: [Output Only] Informational warning -// message. -type ResourcePolicyListWarning 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" - // "DEPRECATED_RESOURCE_USED" - // "DEPRECATED_TYPE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "EXPERIMENTAL_TYPE_USED" - // "EXTERNAL_API_WARNING" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "MISSING_TYPE_DEPENDENCY" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SCHEMA_VALIDATION_IGNORED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNDECLARED_PROPERTIES" - // "UNREACHABLE" - 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 []*ResourcePolicyListWarningData `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 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 *ResourcePolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyListWarning - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ResourcePolicyListWarningData 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 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 *ResourcePolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ResourcePolicyWeeklyCycle: Time window specified for weekly // operations. type ResourcePolicyWeeklyCycle struct { @@ -23793,9 +23392,6 @@ type Router struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // Nats: A list of Nat services created in this router. - Nats []*RouterNat `json:"nats,omitempty"` - // Network: URI of the network to which this router belongs. Network string `json:"network,omitempty"` @@ -24379,140 +23975,6 @@ func (s *RouterListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RouterNat: Represents a Nat resource. It enables the VMs within the -// specified subnetworks to access Internet without external IP -// addresses. It specifies a list of subnetworks (and the ranges within) -// that want to use NAT. Customers can also provide the external IPs -// that would be used for NAT. GCP would auto-allocate ephemeral IPs if -// no external IPs are provided. -type RouterNat struct { - // IcmpIdleTimeoutSec: Timeout (in seconds) for ICMP connections. - // Defaults to 30s if not set. - IcmpIdleTimeoutSec int64 `json:"icmpIdleTimeoutSec,omitempty"` - - // MinPortsPerVm: Minimum number of ports allocated to a VM from this - // NAT config. If not set, a default number of ports is allocated to a - // VM. This gets rounded up to the nearest power of 2. Eg. if the value - // of this field is 50, at least 64 ports will be allocated to a VM. - MinPortsPerVm int64 `json:"minPortsPerVm,omitempty"` - - // Name: Unique name of this Nat service. The name must be 1-63 - // characters long and comply with RFC1035. - Name string `json:"name,omitempty"` - - // NatIpAllocateOption: Specify the NatIpAllocateOption. If it is - // AUTO_ONLY, then nat_ip should be empty. - // - // Possible values: - // "AUTO_ONLY" - // "MANUAL_ONLY" - NatIpAllocateOption string `json:"natIpAllocateOption,omitempty"` - - // NatIps: A list of URLs of the IP resources used for this Nat service. - // These IPs must be valid static external IP addresses assigned to the - // project. max_length is subject to change post alpha. - NatIps []string `json:"natIps,omitempty"` - - // SourceSubnetworkIpRangesToNat: Specify the Nat option. If this field - // contains ALL_SUBNETWORKS_ALL_IP_RANGES or - // ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any - // other Router.Nat section in any Router for this network in this - // region. - // - // Possible values: - // "ALL_SUBNETWORKS_ALL_IP_RANGES" - // "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES" - // "LIST_OF_SUBNETWORKS" - SourceSubnetworkIpRangesToNat string `json:"sourceSubnetworkIpRangesToNat,omitempty"` - - // Subnetworks: A list of Subnetwork resources whose traffic should be - // translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS - // is selected for the SubnetworkIpRangeToNatOption above. - Subnetworks []*RouterNatSubnetworkToNat `json:"subnetworks,omitempty"` - - // TcpEstablishedIdleTimeoutSec: Timeout (in seconds) for TCP - // established connections. Defaults to 1200s if not set. - TcpEstablishedIdleTimeoutSec int64 `json:"tcpEstablishedIdleTimeoutSec,omitempty"` - - // TcpTransitoryIdleTimeoutSec: Timeout (in seconds) for TCP transitory - // connections. Defaults to 30s if not set. - TcpTransitoryIdleTimeoutSec int64 `json:"tcpTransitoryIdleTimeoutSec,omitempty"` - - // UdpIdleTimeoutSec: Timeout (in seconds) for UDP connections. Defaults - // to 30s if not set. - UdpIdleTimeoutSec int64 `json:"udpIdleTimeoutSec,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IcmpIdleTimeoutSec") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IcmpIdleTimeoutSec") 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 *RouterNat) MarshalJSON() ([]byte, error) { - type NoMethod RouterNat - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RouterNatSubnetworkToNat: Defines the IP ranges that want to use NAT -// for a subnetwork. -type RouterNatSubnetworkToNat struct { - // Name: URL for the subnetwork resource to use NAT. - Name string `json:"name,omitempty"` - - // SecondaryIpRangeNames: A list of the secondary ranges of the - // Subnetwork that are allowed to use NAT. This can be populated only if - // "LIST_OF_SECONDARY_IP_RANGES" is one of the values in - // source_ip_ranges_to_nat. - SecondaryIpRangeNames []string `json:"secondaryIpRangeNames,omitempty"` - - // SourceIpRangesToNat: Specify the options for NAT ranges in the - // Subnetwork. All usages of single value are valid except - // NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with multiple - // values is: ["PRIMARY_IP_RANGE", "LIST_OF_SECONDARY_IP_RANGES"] - // Default: [ALL_IP_RANGES] - // - // Possible values: - // "ALL_IP_RANGES" - // "LIST_OF_SECONDARY_IP_RANGES" - // "PRIMARY_IP_RANGE" - SourceIpRangesToNat []string `json:"sourceIpRangesToNat,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Name") 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 *RouterNatSubnetworkToNat) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatSubnetworkToNat - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - type RouterStatus struct { // BestRoutes: Best routes for this router's network. BestRoutes []*Route `json:"bestRoutes,omitempty"` @@ -24522,8 +23984,6 @@ type RouterStatus struct { BgpPeerStatus []*RouterStatusBgpPeerStatus `json:"bgpPeerStatus,omitempty"` - NatStatus []*RouterStatusNatStatus `json:"natStatus,omitempty"` - // Network: URI of the network to which this router belongs. Network string `json:"network,omitempty"` @@ -24611,57 +24071,6 @@ func (s *RouterStatusBgpPeerStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RouterStatusNatStatus: Status of a NAT contained in this router. -type RouterStatusNatStatus struct { - // AutoAllocatedNatIps: A list of IPs auto-allocated for NAT. Example: - // ["1.1.1.1", "129.2.16.89"] - AutoAllocatedNatIps []string `json:"autoAllocatedNatIps,omitempty"` - - // MinExtraNatIpsNeeded: The number of extra IPs to allocate. This will - // be greater than 0 only if user-specified IPs are NOT enough to allow - // all configured VMs to use NAT. This value is meaningful only when - // auto-allocation of NAT IPs is *not* used. - MinExtraNatIpsNeeded int64 `json:"minExtraNatIpsNeeded,omitempty"` - - // Name: Unique name of this NAT. - Name string `json:"name,omitempty"` - - // NumVmEndpointsWithNatMappings: Number of VM endpoints (i.e., Nics) - // that can use NAT. - NumVmEndpointsWithNatMappings int64 `json:"numVmEndpointsWithNatMappings,omitempty"` - - // UserAllocatedNatIpResources: A list of fully qualified URLs of - // reserved IP address resources. - UserAllocatedNatIpResources []string `json:"userAllocatedNatIpResources,omitempty"` - - // UserAllocatedNatIps: A list of IPs user-allocated for NAT. They will - // be raw IP strings like "179.12.26.133". - UserAllocatedNatIps []string `json:"userAllocatedNatIps,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoAllocatedNatIps") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoAllocatedNatIps") 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 *RouterStatusNatStatus) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatusNatStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - type RouterStatusResponse struct { // Kind: Type of resource. Kind string `json:"kind,omitempty"` @@ -25677,72 +25086,6 @@ func (s *ShieldedVmConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ShieldedVmIdentity: A shielded VM identity entry. -type ShieldedVmIdentity struct { - EncryptionKey *ShieldedVmIdentityEntry `json:"encryptionKey,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#shieldedVmIdentity for shielded VM identity entry. - Kind string `json:"kind,omitempty"` - - SigningKey *ShieldedVmIdentityEntry `json:"signingKey,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "EncryptionKey") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EncryptionKey") 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 *ShieldedVmIdentity) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedVmIdentity - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ShieldedVmIdentityEntry: A Shielded VM Identity Entry. -type ShieldedVmIdentityEntry struct { - EkCert string `json:"ekCert,omitempty"` - - EkPub string `json:"ekPub,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EkCert") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EkCert") 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 *ShieldedVmIdentityEntry) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedVmIdentityEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ShieldedVmIntegrityPolicy: The policy describes the baseline against // which VM instance boot integrity is measured. type ShieldedVmIntegrityPolicy struct { @@ -26931,8 +26274,6 @@ type Subnetwork struct { Description string `json:"description,omitempty"` // EnableFlowLogs: Whether to enable flow logging for this subnetwork. - // If this field is not explicitly set, it will not appear in get - // listings. If not set the default behavior is to disable flow logging. EnableFlowLogs bool `json:"enableFlowLogs,omitempty"` // Fingerprint: Fingerprint of this resource. A hash of the contents @@ -30768,6 +30109,47 @@ func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type UDPHealthCheck struct { + // Port: The UDP port number for the health check request. Valid values + // are 1 through 65535. + Port int64 `json:"port,omitempty"` + + // PortName: Port name as defined in InstanceGroup#NamedPort#name. If + // both port and port_name are defined, port takes precedence. + PortName string `json:"portName,omitempty"` + + // Request: Raw data of request to send in payload of UDP packet. It is + // an error if this is empty. The request data can only be ASCII. + Request string `json:"request,omitempty"` + + // Response: The bytes to match against the beginning of the response + // data. It is an error if this is empty. The response data can only be + // ASCII. + Response string `json:"response,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Port") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Port") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UDPHealthCheck) MarshalJSON() ([]byte, error) { + type NoMethod UDPHealthCheck + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UrlMap: A UrlMap resource. This resource defines the mapping from URL // to the BackendService resource, based on the "longest-match" of the // URL's host and path. @@ -31440,241 +30822,6 @@ func (s *UsageExportLocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VmEndpointNatMappings: Contain information of Nat mapping for a VM -// endpoint (i.e., NIC). -type VmEndpointNatMappings struct { - // InstanceName: Name of the VM instance which the endpoint belongs to - InstanceName string `json:"instanceName,omitempty"` - - InterfaceNatMappings []*VmEndpointNatMappingsInterfaceNatMappings `json:"interfaceNatMappings,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceName") 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 *VmEndpointNatMappings) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// VmEndpointNatMappingsInterfaceNatMappings: Contain information of Nat -// mapping for an interface of this endpoint. -type VmEndpointNatMappingsInterfaceNatMappings struct { - // NatIpPortRanges: A list of all IP:port-range mappings assigned to - // this interface. These ranges are inclusive, that is, both the first - // and the last ports can be used for NAT. Example: - // ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. - NatIpPortRanges []string `json:"natIpPortRanges,omitempty"` - - // NumTotalNatPorts: Total number of ports across all NAT IPs allocated - // to this interface. It equals to the aggregated port number in the - // field nat_ip_port_ranges. - NumTotalNatPorts int64 `json:"numTotalNatPorts,omitempty"` - - // SourceAliasIpRange: Alias IP range for this interface endpoint. It - // will be a private (RFC 1918) IP range. Examples: "10.33.4.55/32", or - // "192.168.5.0/24". - SourceAliasIpRange string `json:"sourceAliasIpRange,omitempty"` - - // SourceVirtualIp: Primary IP of the VM for this NIC. - SourceVirtualIp string `json:"sourceVirtualIp,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NatIpPortRanges") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NatIpPortRanges") 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 *VmEndpointNatMappingsInterfaceNatMappings) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsInterfaceNatMappings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// VmEndpointNatMappingsList: Contains a list of VmEndpointNatMappings. -type VmEndpointNatMappingsList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#vmEndpointNatMappingsList for lists of Nat mappings of VM - // endpoints. - 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"` - - // Result: [Output Only] A list of Nat mapping information of VM - // endpoints. - Result []*VmEndpointNatMappings `json:"result,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *VmEndpointNatMappingsListWarning `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 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 *VmEndpointNatMappingsList) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// VmEndpointNatMappingsListWarning: [Output Only] Informational warning -// message. -type VmEndpointNatMappingsListWarning 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" - // "DEPRECATED_RESOURCE_USED" - // "DEPRECATED_TYPE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "EXPERIMENTAL_TYPE_USED" - // "EXTERNAL_API_WARNING" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "MISSING_TYPE_DEPENDENCY" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SCHEMA_VALIDATION_IGNORED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNDECLARED_PROPERTIES" - // "UNREACHABLE" - 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 []*VmEndpointNatMappingsListWarningData `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 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 *VmEndpointNatMappingsListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsListWarning - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type VmEndpointNatMappingsListWarningData 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 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 *VmEndpointNatMappingsListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // VpnTunnel: VPN tunnel resource. (== resource_for beta.vpnTunnels ==) // (== resource_for v1.vpnTunnels ==) type VpnTunnel struct { @@ -32942,13 +32089,9 @@ func (c *AcceleratorTypesAggregatedListCall) 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, "{project}/aggregated/acceleratorTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -33134,13 +32277,9 @@ 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, "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -33362,13 +32501,9 @@ func (c *AcceleratorTypesListCall) 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, "{project}/zones/{zone}/acceleratorTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -33623,13 +32758,9 @@ 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, "{project}/aggregated/addresses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -33821,13 +32952,9 @@ func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/regions/{region}/addresses/{address}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -33992,13 +33119,9 @@ func (c *AddressesGetCall) 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, "{project}/regions/{region}/addresses/{address}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -34170,13 +33293,9 @@ func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -34397,13 +33516,9 @@ 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, "{project}/regions/{region}/addresses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -34611,13 +33726,9 @@ func (c *AddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -34778,13 +33889,9 @@ func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -35006,13 +34113,9 @@ 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, "{project}/aggregated/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -35203,13 +34306,9 @@ func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/zones/{zone}/autoscalers/{autoscaler}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -35374,13 +34473,9 @@ func (c *AutoscalersGetCall) 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, "{project}/zones/{zone}/autoscalers/{autoscaler}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -35551,13 +34646,9 @@ func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -35777,13 +34868,9 @@ func (c *AutoscalersListCall) 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, "{project}/zones/{zone}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -35997,13 +35084,9 @@ func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -36161,13 +35244,9 @@ func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -36348,13 +35427,9 @@ func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -36529,13 +35604,9 @@ func (c *BackendBucketsAddSignedUrlKeyCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -36695,13 +35766,9 @@ func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) 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, "{project}/global/backendBuckets/{backendBucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -36861,13 +35928,9 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Resp 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, "{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -37027,13 +36090,9 @@ func (c *BackendBucketsGetCall) 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, "{project}/global/backendBuckets/{backendBucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -37193,13 +36252,9 @@ func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -37408,13 +36463,9 @@ func (c *BackendBucketsListCall) 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, "{project}/global/backendBuckets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -37612,13 +36663,9 @@ func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -37787,13 +36834,9 @@ func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -37962,13 +37005,9 @@ func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/addSignedUrlKey") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -38185,13 +37224,9 @@ func (c *BackendServicesAggregatedListCall) 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, "{project}/aggregated/backendServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -38381,13 +37416,9 @@ func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error 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, "{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -38547,13 +37578,9 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Res 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, "{project}/global/backendServices/{backendService}/deleteSignedUrlKey") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -38714,13 +37741,9 @@ 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, "{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -38864,13 +37887,9 @@ func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/getHealth") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -39035,13 +38054,9 @@ func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -39251,13 +38266,9 @@ func (c *BackendServicesListCall) 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, "{project}/global/backendServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -39459,13 +38470,9 @@ func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -39634,13 +38641,9 @@ func (c *BackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/setSecurityPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -39789,13 +38792,9 @@ func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -39963,13 +38962,9 @@ func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -40187,13 +39182,9 @@ 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, "{project}/aggregated/diskTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -40381,13 +39372,9 @@ func (c *DiskTypesGetCall) 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, "{project}/zones/{zone}/diskTypes/{diskType}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -40610,13 +39597,9 @@ func (c *DiskTypesListCall) 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, "{project}/zones/{zone}/diskTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -40825,13 +39808,9 @@ func (c *DisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/addResourcePolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -41058,13 +40037,9 @@ 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, "{project}/aggregated/disks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -41269,13 +40244,9 @@ func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/createSnapshot") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -41455,13 +40426,9 @@ func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/zones/{zone}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -41626,13 +40593,9 @@ func (c *DisksGetCall) 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, "{project}/zones/{zone}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -41793,13 +40756,9 @@ func (c *DisksGetIamPolicyCall) 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, "{project}/zones/{zone}/disks/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -41981,13 +40940,9 @@ func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -42213,13 +41168,9 @@ func (c *DisksListCall) 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, "{project}/zones/{zone}/disks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -42426,13 +41377,9 @@ func (c *DisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/removeResourcePolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -42612,13 +41559,9 @@ func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/resize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -42779,13 +41722,9 @@ func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -42960,13 +41899,9 @@ func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -43127,13 +42062,9 @@ func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -43300,13 +42231,9 @@ func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/firewalls/{firewall}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -43460,13 +42387,9 @@ func (c *FirewallsGetCall) 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, "{project}/global/firewalls/{firewall}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -43627,13 +42550,9 @@ func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -43843,13 +42762,9 @@ 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, "{project}/global/firewalls") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -44048,13 +42963,9 @@ func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -44204,13 +43115,9 @@ func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -44378,13 +43285,9 @@ func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -44602,13 +43505,9 @@ 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, "{project}/aggregated/forwardingRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -44800,13 +43699,9 @@ func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error 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, "{project}/regions/{region}/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -44971,13 +43866,9 @@ func (c *ForwardingRulesGetCall) 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, "{project}/regions/{region}/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -45149,13 +44040,9 @@ func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -45376,13 +44263,9 @@ 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, "{project}/regions/{region}/forwardingRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -45590,13 +44473,9 @@ func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -45777,13 +44656,9 @@ func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -45944,13 +44819,9 @@ func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -46117,13 +44988,9 @@ func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error 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, "{project}/global/addresses/{address}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -46278,13 +45145,9 @@ func (c *GlobalAddressesGetCall) 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, "{project}/global/addresses/{address}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -46445,13 +45308,9 @@ func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -46660,13 +45519,9 @@ func (c *GlobalAddressesListCall) 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, "{project}/global/addresses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -46844,13 +45699,9 @@ func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -46995,13 +45846,9 @@ func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -47159,13 +46006,9 @@ func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, 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, "{project}/global/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -47320,13 +46163,9 @@ func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -47487,13 +46326,9 @@ func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -47703,13 +46538,9 @@ func (c *GlobalForwardingRulesListCall) 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, "{project}/global/forwardingRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -47887,13 +46718,9 @@ func (c *GlobalForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -48058,13 +46885,9 @@ func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}/setTarget") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -48214,13 +47037,9 @@ func (c *GlobalForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*ht } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -48434,13 +47253,9 @@ func (c *GlobalOperationsAggregatedListCall) 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, "{project}/aggregated/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -48611,13 +47426,9 @@ func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, erro 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, "{project}/global/operations/{operation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -48739,13 +47550,9 @@ func (c *GlobalOperationsGetCall) 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, "{project}/global/operations/{operation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -48957,13 +47764,9 @@ func (c *GlobalOperationsListCall) 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, "{project}/global/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -49152,13 +47955,9 @@ func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -49312,13 +48111,9 @@ func (c *HealthChecksGetCall) 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, "{project}/global/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -49478,13 +48273,9 @@ func (c *HealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -49693,13 +48484,9 @@ func (c *HealthChecksListCall) 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, "{project}/global/healthChecks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -49897,13 +48684,9 @@ func (c *HealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -50053,13 +48836,9 @@ func (c *HealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -50224,13 +49003,9 @@ func (c *HealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -50392,13 +49167,9 @@ func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, erro 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, "{project}/global/httpHealthChecks/{httpHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -50553,13 +49324,9 @@ func (c *HttpHealthChecksGetCall) 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, "{project}/global/httpHealthChecks/{httpHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -50720,13 +49487,9 @@ func (c *HttpHealthChecksInsertCall) 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, "{project}/global/httpHealthChecks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -50936,13 +49699,9 @@ func (c *HttpHealthChecksListCall) 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, "{project}/global/httpHealthChecks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -51141,13 +49900,9 @@ func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -51297,13 +50052,9 @@ func (c *HttpHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Re } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -51469,13 +50220,9 @@ func (c *HttpHealthChecksUpdateCall) 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, "{project}/global/httpHealthChecks/{httpHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -51636,13 +50383,9 @@ func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, err 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, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -51796,13 +50539,9 @@ func (c *HttpsHealthChecksGetCall) 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, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -51962,13 +50701,9 @@ func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -52177,13 +50912,9 @@ func (c *HttpsHealthChecksListCall) 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, "{project}/global/httpsHealthChecks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -52381,13 +51112,9 @@ func (c *HttpsHealthChecksPatchCall) 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, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -52537,13 +51264,9 @@ func (c *HttpsHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -52708,13 +51431,9 @@ func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -52876,13 +51595,9 @@ func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/images/{image}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -53051,13 +51766,9 @@ func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}/deprecate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -53215,13 +51926,9 @@ func (c *ImagesGetCall) 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, "{project}/global/images/{image}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -53371,13 +52078,9 @@ func (c *ImagesGetFromFamilyCall) 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, "{project}/global/images/family/{family}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -53527,13 +52230,9 @@ func (c *ImagesGetIamPolicyCall) 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, "{project}/global/images/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -53701,13 +52400,9 @@ func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -53930,13 +52625,9 @@ func (c *ImagesListCall) 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, "{project}/global/images") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -54114,13 +52805,9 @@ func (c *ImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -54265,13 +52952,9 @@ func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -54416,13 +53099,9 @@ func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -54604,13 +53283,9 @@ func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -54835,13 +53510,9 @@ func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.R } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instanceGroupManagers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -55036,13 +53707,9 @@ func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, 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, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -55231,13 +53898,9 @@ func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http. } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -55404,13 +54067,9 @@ func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -55587,13 +54246,9 @@ func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -55812,13 +54467,9 @@ func (c *InstanceGroupManagersListCall) 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, "{project}/zones/{zone}/instanceGroupManagers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -56066,13 +54717,9 @@ func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (* 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, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -56294,13 +54941,9 @@ func (c *InstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -56491,13 +55134,9 @@ func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*htt } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -56678,13 +55317,9 @@ func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, 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, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -56880,13 +55515,9 @@ func (c *InstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -57063,13 +55694,9 @@ func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -57248,13 +55875,9 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*h } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -57437,13 +56060,9 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -57602,13 +56221,9 @@ func (c *InstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*ht } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -57787,13 +56402,9 @@ func (c *InstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -57972,13 +56583,9 @@ func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -58203,13 +56810,9 @@ func (c *InstanceGroupsAggregatedListCall) 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, "{project}/aggregated/instanceGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -58403,13 +57006,9 @@ func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) 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, "{project}/zones/{zone}/instanceGroups/{instanceGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -58572,13 +57171,9 @@ func (c *InstanceGroupsGetCall) 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, "{project}/zones/{zone}/instanceGroups/{instanceGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -58747,13 +57342,9 @@ func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -58972,13 +57563,9 @@ func (c *InstanceGroupsListCall) 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, "{project}/zones/{zone}/instanceGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -59228,13 +57815,9 @@ func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -59456,13 +58039,9 @@ func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -59639,13 +58218,9 @@ func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -59804,13 +58379,9 @@ func (c *InstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -59979,13 +58550,9 @@ func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, err 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, "{project}/global/instanceTemplates/{instanceTemplate}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -60140,13 +58707,9 @@ func (c *InstanceTemplatesGetCall) 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, "{project}/global/instanceTemplates/{instanceTemplate}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -60296,13 +58859,9 @@ func (c *InstanceTemplatesGetIamPolicyCall) 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, "{project}/global/instanceTemplates/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -60466,13 +59025,9 @@ func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -60682,13 +59237,9 @@ func (c *InstanceTemplatesListCall) 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, "{project}/global/instanceTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -60866,13 +59417,9 @@ func (c *InstanceTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -61017,13 +59564,9 @@ func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -61192,13 +59735,9 @@ func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/addAccessConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -61433,13 +59972,9 @@ func (c *InstancesAggregatedListCall) 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, "{project}/aggregated/instances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -61649,13 +60184,9 @@ func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/attachDisk") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -61834,13 +60365,9 @@ func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/zones/{zone}/instances/{instance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -62013,13 +60540,9 @@ func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, 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, "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -62204,13 +60727,9 @@ func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) 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, "{project}/zones/{zone}/instances/{instance}/detachDisk") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -62383,13 +60902,9 @@ func (c *InstancesGetCall) 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, "{project}/zones/{zone}/instances/{instance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -62449,7 +60964,7 @@ func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { // "instance": { // "description": "Name of the instance resource to return.", // "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" // }, @@ -62481,196 +60996,6 @@ func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { } -// method id "compute.instances.getGuestAttributes": - -type InstancesGetGuestAttributesCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetGuestAttributes: Returns the specified guest attributes entry. -func (r *InstancesService) GetGuestAttributes(project string, zone string, instance string) *InstancesGetGuestAttributesCall { - c := &InstancesGetGuestAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// QueryPath sets the optional parameter "queryPath": Specifies the -// guest attributes path to be queried. -func (c *InstancesGetGuestAttributesCall) QueryPath(queryPath string) *InstancesGetGuestAttributesCall { - c.urlParams_.Set("queryPath", queryPath) - return c -} - -// VariableKey sets the optional parameter "variableKey": Specifies the -// key for the guest attributes entry. -func (c *InstancesGetGuestAttributesCall) VariableKey(variableKey string) *InstancesGetGuestAttributesCall { - c.urlParams_.Set("variableKey", variableKey) - 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 *InstancesGetGuestAttributesCall) Fields(s ...googleapi.Field) *InstancesGetGuestAttributesCall { - 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 *InstancesGetGuestAttributesCall) IfNoneMatch(entityTag string) *InstancesGetGuestAttributesCall { - 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 *InstancesGetGuestAttributesCall) Context(ctx context.Context) *InstancesGetGuestAttributesCall { - 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 *InstancesGetGuestAttributesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetGuestAttributesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/getGuestAttributes") - 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, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getGuestAttributes" call. -// Exactly one of *GuestAttributes or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *GuestAttributes.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 *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*GuestAttributes, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GuestAttributes{ - 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 guest attributes entry.", - // "httpMethod": "GET", - // "id": "compute.instances.getGuestAttributes", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "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", - // "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" - // }, - // "queryPath": { - // "description": "Specifies the guest attributes path to be queried.", - // "location": "query", - // "type": "string" - // }, - // "variableKey": { - // "description": "Specifies the key for the guest attributes entry.", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/getGuestAttributes", - // "response": { - // "$ref": "GuestAttributes" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - // method id "compute.instances.getIamPolicy": type InstancesGetIamPolicyCall struct { @@ -62740,13 +61065,9 @@ func (c *InstancesGetIamPolicyCall) 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, "{project}/zones/{zone}/instances/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -62926,13 +61247,9 @@ func (c *InstancesGetSerialPortOutputCall) 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, "{project}/zones/{zone}/instances/{instance}/serialPort") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -63039,173 +61356,6 @@ func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*Se } -// method id "compute.instances.getShieldedVmIdentity": - -type InstancesGetShieldedVmIdentityCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetShieldedVmIdentity: Returns the Shielded VM Identity of an -// instance -func (r *InstancesService) GetShieldedVmIdentity(project string, zone string, instance string) *InstancesGetShieldedVmIdentityCall { - c := &InstancesGetShieldedVmIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - 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 *InstancesGetShieldedVmIdentityCall) Fields(s ...googleapi.Field) *InstancesGetShieldedVmIdentityCall { - 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 *InstancesGetShieldedVmIdentityCall) IfNoneMatch(entityTag string) *InstancesGetShieldedVmIdentityCall { - 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 *InstancesGetShieldedVmIdentityCall) Context(ctx context.Context) *InstancesGetShieldedVmIdentityCall { - 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 *InstancesGetShieldedVmIdentityCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetShieldedVmIdentityCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity") - 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, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getShieldedVmIdentity" call. -// Exactly one of *ShieldedVmIdentity or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ShieldedVmIdentity.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 *InstancesGetShieldedVmIdentityCall) Do(opts ...googleapi.CallOption) (*ShieldedVmIdentity, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ShieldedVmIdentity{ - 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 Shielded VM Identity of an instance", - // "httpMethod": "GET", - // "id": "compute.instances.getShieldedVmIdentity", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "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", - // "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": "{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity", - // "response": { - // "$ref": "ShieldedVmIdentity" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - // method id "compute.instances.insert": type InstancesInsertCall struct { @@ -63255,9 +61405,10 @@ func (c *InstancesInsertCall) RequestId(requestId string) *InstancesInsertCall { // This field is optional. It can be a full or partial URL. For example, // the following are all valid URLs to an instance template: // - -// https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate -// - projects/project/global/instanceTemplates/instanceTemplate -// - global/instanceTemplates/instanceTemplate +// https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate +// - projects/project/global/global/instanceTemplates/instanceTemplate +// +// - global/instancesTemplates/instanceTemplate func (c *InstancesInsertCall) SourceInstanceTemplate(sourceInstanceTemplate string) *InstancesInsertCall { c.urlParams_.Set("sourceInstanceTemplate", sourceInstanceTemplate) return c @@ -63301,13 +61452,9 @@ func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -63375,7 +61522,7 @@ func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // }, // "sourceInstanceTemplate": { - // "description": "Specifies instance template to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: \n- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate \n- projects/project/global/instanceTemplates/instanceTemplate \n- global/instanceTemplates/instanceTemplate", + // "description": "Specifies instance template to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: \n- https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate \n- projects/project/global/global/instanceTemplates/instanceTemplate \n- global/instancesTemplates/instanceTemplate", // "location": "query", // "type": "string" // }, @@ -63533,13 +61680,9 @@ func (c *InstancesListCall) 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, "{project}/zones/{zone}/instances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -63798,13 +61941,9 @@ func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, erro } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/referrers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -64015,13 +62154,9 @@ func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/zones/{zone}/instances/{instance}/reset") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -64197,13 +62332,9 @@ func (c *InstancesSetDeletionProtectionCall) doRequest(alt string) (*http.Respon 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, "{project}/zones/{zone}/instances/{resource}/setDeletionProtection") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -64382,13 +62513,9 @@ func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, 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, "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -64561,13 +62688,9 @@ func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -64742,13 +62865,9 @@ func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -64928,13 +63047,9 @@ func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineResources") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -65114,13 +63229,9 @@ func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineType") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -65301,13 +63412,9 @@ func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMetadata") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -65489,13 +63596,9 @@ func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -65675,13 +63778,9 @@ func (c *InstancesSetSchedulingCall) 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, "{project}/zones/{zone}/instances/{instance}/setScheduling") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -65862,13 +63961,9 @@ func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setServiceAccount") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -66050,13 +64145,9 @@ func (c *InstancesSetShieldedVmIntegrityPolicyCall) doRequest(alt string) (*http } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setShieldedVmIntegrityPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -66237,13 +64328,9 @@ func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setTags") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -66397,13 +64484,9 @@ func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Res 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, "{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -66569,13 +64652,9 @@ func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/zones/{zone}/instances/{instance}/start") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -66753,13 +64832,9 @@ func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -66937,13 +65012,9 @@ func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/zones/{zone}/instances/{instance}/stop") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -67101,13 +65172,9 @@ func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -67286,13 +65353,9 @@ func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateAccessConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -67480,13 +65543,9 @@ func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateNetworkInterface") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -67675,13 +65734,9 @@ func (c *InstancesUpdateShieldedVmConfigCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateShieldedVmConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -67908,13 +65963,9 @@ func (c *InterconnectAttachmentsAggregatedListCall) doRequest(alt string) (*http } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/interconnectAttachments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -68106,13 +66157,9 @@ func (c *InterconnectAttachmentsDeleteCall) doRequest(alt string) (*http.Respons 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, "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -68276,13 +66323,9 @@ func (c *InterconnectAttachmentsGetCall) 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, "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -68453,13 +66496,9 @@ func (c *InterconnectAttachmentsInsertCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -68679,13 +66718,9 @@ func (c *InterconnectAttachmentsListCall) 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, "{project}/regions/{region}/interconnectAttachments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -68894,13 +66929,9 @@ func (c *InterconnectAttachmentsPatchCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -69080,13 +67111,9 @@ func (c *InterconnectAttachmentsSetLabelsCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -69247,13 +67274,9 @@ func (c *InterconnectAttachmentsTestIamPermissionsCall) doRequest(alt string) (* } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -69416,13 +67439,9 @@ func (c *InterconnectLocationsGetCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnectLocations/{interconnectLocation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -69633,13 +67652,9 @@ func (c *InterconnectLocationsListCall) 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, "{project}/global/interconnectLocations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -69828,13 +67843,9 @@ func (c *InterconnectsDeleteCall) doRequest(alt string) (*http.Response, error) 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, "{project}/global/interconnects/{interconnect}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -69988,13 +67999,9 @@ func (c *InterconnectsGetCall) 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, "{project}/global/interconnects/{interconnect}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -70077,163 +68084,6 @@ func (c *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, } -// method id "compute.interconnects.getDiagnostics": - -type InterconnectsGetDiagnosticsCall struct { - s *Service - project string - interconnect string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetDiagnostics: Returns the interconnectDiagnostics for the specified -// interconnect. -func (r *InterconnectsService) GetDiagnostics(project string, interconnect string) *InterconnectsGetDiagnosticsCall { - c := &InterconnectsGetDiagnosticsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - 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 *InterconnectsGetDiagnosticsCall) Fields(s ...googleapi.Field) *InterconnectsGetDiagnosticsCall { - 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 *InterconnectsGetDiagnosticsCall) IfNoneMatch(entityTag string) *InterconnectsGetDiagnosticsCall { - 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 *InterconnectsGetDiagnosticsCall) Context(ctx context.Context) *InterconnectsGetDiagnosticsCall { - 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 *InterconnectsGetDiagnosticsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsGetDiagnosticsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{interconnect}/getDiagnostics") - 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, - "interconnect": c.interconnect, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.getDiagnostics" call. -// Exactly one of *InterconnectsGetDiagnosticsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *InterconnectsGetDiagnosticsResponse.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 *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*InterconnectsGetDiagnosticsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InterconnectsGetDiagnosticsResponse{ - 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 interconnectDiagnostics for the specified interconnect.", - // "httpMethod": "GET", - // "id": "compute.interconnects.getDiagnostics", - // "parameterOrder": [ - // "project", - // "interconnect" - // ], - // "parameters": { - // "interconnect": { - // "description": "Name of the interconnect resource to query.", - // "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", - // "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": "{project}/global/interconnects/{interconnect}/getDiagnostics", - // "response": { - // "$ref": "InterconnectsGetDiagnosticsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - // method id "compute.interconnects.insert": type InterconnectsInsertCall struct { @@ -70311,13 +68161,9 @@ func (c *InterconnectsInsertCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -70526,13 +68372,9 @@ func (c *InterconnectsListCall) 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, "{project}/global/interconnects") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -70730,13 +68572,9 @@ func (c *InterconnectsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{interconnect}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -70886,13 +68724,9 @@ func (c *InterconnectsSetLabelsCall) 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, "{project}/global/interconnects/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -71037,13 +68871,9 @@ func (c *InterconnectsTestIamPermissionsCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -71196,13 +69026,9 @@ func (c *LicenseCodesGetCall) 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, "{project}/global/licenseCodes/{licenseCode}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -71356,13 +69182,9 @@ func (c *LicensesDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/licenses/{license}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -71516,13 +69338,9 @@ func (c *LicensesGetCall) 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, "{project}/global/licenses/{license}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -71681,13 +69499,9 @@ func (c *LicensesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -71903,13 +69717,9 @@ func (c *LicensesListCall) 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, "{project}/global/licenses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -72155,13 +69965,9 @@ func (c *MachineTypesAggregatedListCall) 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, "{project}/aggregated/machineTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -72349,13 +70155,9 @@ func (c *MachineTypesGetCall) 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, "{project}/zones/{zone}/machineTypes/{machineType}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -72578,13 +70380,9 @@ func (c *MachineTypesListCall) 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, "{project}/zones/{zone}/machineTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -72839,13 +70637,9 @@ func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.R } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/networkEndpointGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -73045,13 +70839,9 @@ func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -73224,13 +71014,9 @@ func (c *NetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, 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, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -73405,13 +71191,9 @@ func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -73577,13 +71359,9 @@ func (c *NetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -73752,13 +71530,9 @@ func (c *NetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -73977,13 +71751,9 @@ func (c *NetworkEndpointGroupsListCall) 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, "{project}/zones/{zone}/networkEndpointGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -74234,13 +72004,9 @@ func (c *NetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (* } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -74441,13 +72207,9 @@ func (c *NetworkEndpointGroupsTestIamPermissionsCall) doRequest(alt string) (*ht } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -74620,13 +72382,9 @@ func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/addPeering") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -74788,13 +72546,9 @@ func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/networks/{network}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -74949,13 +72703,9 @@ func (c *NetworksGetCall) 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, "{project}/global/networks/{network}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -75116,13 +72866,9 @@ func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -75332,13 +73078,9 @@ func (c *NetworksListCall) 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, "{project}/global/networks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -75536,13 +73278,9 @@ func (c *NetworksPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -75710,13 +73448,9 @@ func (c *NetworksRemovePeeringCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/removePeering") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -75878,13 +73612,9 @@ func (c *NetworksSwitchToCustomModeCall) doRequest(alt string) (*http.Response, 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, "{project}/global/networks/{network}/switchToCustomMode") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -76031,13 +73761,9 @@ func (c *NetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -76203,13 +73929,9 @@ func (c *NodeGroupsAddNodesCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/nodeGroups/{nodeGroup}/addNodes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -76436,13 +74158,9 @@ func (c *NodeGroupsAggregatedListCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/nodeGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -76633,13 +74351,9 @@ func (c *NodeGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/zones/{zone}/nodeGroups/{nodeGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -76815,13 +74529,9 @@ func (c *NodeGroupsDeleteNodesCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/nodeGroups/{nodeGroup}/deleteNodes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -76990,13 +74700,9 @@ func (c *NodeGroupsGetCall) 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, "{project}/zones/{zone}/nodeGroups/{nodeGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -77157,13 +74863,9 @@ func (c *NodeGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, erro } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -77335,13 +75037,9 @@ func (c *NodeGroupsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/nodeGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -77570,13 +75268,9 @@ func (c *NodeGroupsListCall) 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, "{project}/zones/{zone}/nodeGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -77820,13 +75514,9 @@ func (c *NodeGroupsListNodesCall) doRequest(alt string) (*http.Response, error) 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, "{project}/zones/{zone}/nodeGroups/{nodeGroup}/listNodes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -78024,13 +75714,9 @@ func (c *NodeGroupsSetIamPolicyCall) 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, "{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -78204,13 +75890,9 @@ func (c *NodeGroupsSetNodeTemplateCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/nodeGroups/{nodeGroup}/setNodeTemplate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -78371,13 +76053,9 @@ func (c *NodeGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -78599,13 +76277,9 @@ func (c *NodeTemplatesAggregatedListCall) 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, "{project}/aggregated/nodeTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -78796,13 +76470,9 @@ func (c *NodeTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) 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, "{project}/regions/{region}/nodeTemplates/{nodeTemplate}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -78967,13 +76637,9 @@ func (c *NodeTemplatesGetCall) 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, "{project}/regions/{region}/nodeTemplates/{nodeTemplate}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -79134,13 +76800,9 @@ func (c *NodeTemplatesGetIamPolicyCall) 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, "{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -79311,13 +76973,9 @@ func (c *NodeTemplatesInsertCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/nodeTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -79537,13 +77195,9 @@ func (c *NodeTemplatesListCall) 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, "{project}/regions/{region}/nodeTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -79732,13 +77386,9 @@ func (c *NodeTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -79894,13 +77544,9 @@ func (c *NodeTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -80122,13 +77768,9 @@ func (c *NodeTypesAggregatedListCall) 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, "{project}/aggregated/nodeTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -80315,13 +77957,9 @@ func (c *NodeTypesGetCall) 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, "{project}/zones/{zone}/nodeTypes/{nodeType}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -80543,13 +78181,9 @@ func (c *NodeTypesListCall) 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, "{project}/zones/{zone}/nodeTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -80745,13 +78379,9 @@ func (c *ProjectsDisableXpnHostCall) doRequest(alt string) (*http.Response, erro 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, "{project}/disableXpnHost") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -80906,13 +78536,9 @@ func (c *ProjectsDisableXpnResourceCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/disableXpnResource") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -81062,13 +78688,9 @@ func (c *ProjectsEnableXpnHostCall) doRequest(alt string) (*http.Response, error 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, "{project}/enableXpnHost") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -81224,13 +78846,9 @@ func (c *ProjectsEnableXpnResourceCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/enableXpnResource") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -81376,13 +78994,9 @@ func (c *ProjectsGetCall) 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, "{project}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -81521,13 +79135,9 @@ func (c *ProjectsGetXpnHostCall) 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, "{project}/getXpnHost") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -81728,13 +79338,9 @@ func (c *ProjectsGetXpnResourcesCall) 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, "{project}/getXpnResources") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -81972,13 +79578,9 @@ func (c *ProjectsListXpnHostsCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/listXpnHosts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -82174,13 +79776,9 @@ func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/moveDisk") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -82338,13 +79936,9 @@ func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/moveInstance") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -82503,13 +80097,9 @@ func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setCommonInstanceMetadata") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -82669,13 +80259,9 @@ func (c *ProjectsSetDefaultNetworkTierCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setDefaultNetworkTier") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -82836,13 +80422,9 @@ func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setUsageExportBucket") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -82999,13 +80581,9 @@ func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, err 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, "{project}/regions/{region}/autoscalers/{autoscaler}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -83169,13 +80747,9 @@ func (c *RegionAutoscalersGetCall) 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, "{project}/regions/{region}/autoscalers/{autoscaler}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -83346,13 +80920,9 @@ func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -83572,13 +81142,9 @@ func (c *RegionAutoscalersListCall) 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, "{project}/regions/{region}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -83792,13 +81358,9 @@ func (c *RegionAutoscalersPatchCall) 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, "{project}/regions/{region}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -83956,13 +81518,9 @@ func (c *RegionAutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -84143,13 +81701,9 @@ func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -84318,13 +81872,9 @@ func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, 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, "{project}/regions/{region}/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -84488,13 +82038,9 @@ func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -84648,13 +82194,9 @@ func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}/getHealth") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -84830,13 +82372,9 @@ func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -85056,13 +82594,9 @@ func (c *RegionBackendServicesListCall) 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, "{project}/regions/{region}/backendServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -85274,13 +82808,9 @@ func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -85441,13 +82971,9 @@ func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*ht } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -85625,13 +83151,9 @@ func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -85857,13 +83379,9 @@ func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Respo } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/commitments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -86050,13 +83568,9 @@ func (c *RegionCommitmentsGetCall) 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, "{project}/regions/{region}/commitments/{commitment}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -86227,13 +83741,9 @@ func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -86453,13 +83963,9 @@ func (c *RegionCommitmentsListCall) 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, "{project}/regions/{region}/commitments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -86655,13 +84161,9 @@ func (c *RegionDiskTypesGetCall) 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, "{project}/regions/{region}/diskTypes/{diskType}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -86883,13 +84385,9 @@ func (c *RegionDiskTypesListCall) 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, "{project}/regions/{region}/diskTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -87098,13 +84596,9 @@ func (c *RegionDisksAddResourcePoliciesCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{disk}/addResourcePolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -87283,13 +84777,9 @@ func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{disk}/createSnapshot") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -87464,13 +84954,9 @@ func (c *RegionDisksDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/regions/{region}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -87633,13 +85119,9 @@ func (c *RegionDisksGetCall) 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, "{project}/regions/{region}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -87817,13 +85299,9 @@ func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -88048,13 +85526,9 @@ func (c *RegionDisksListCall) 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, "{project}/regions/{region}/disks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -88262,13 +85736,9 @@ func (c *RegionDisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{disk}/removeResourcePolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -88447,13 +85917,9 @@ func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{disk}/resize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -88632,13 +86098,9 @@ func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -88799,13 +86261,9 @@ func (c *RegionDisksTestIamPermissionsCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -88996,13 +86454,9 @@ func (c *RegionInstanceGroupManagersAbandonInstancesCall) doRequest(alt string) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -89173,13 +86627,9 @@ func (c *RegionInstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Res 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, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -89368,13 +86818,9 @@ func (c *RegionInstanceGroupManagersDeleteInstancesCall) doRequest(alt string) ( } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -89540,13 +86986,9 @@ func (c *RegionInstanceGroupManagersGetCall) 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, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -89722,13 +87164,9 @@ func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -89947,13 +87385,9 @@ func (c *RegionInstanceGroupManagersListCall) doRequest(alt string) (*http.Respo } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -90199,13 +87633,9 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt stri 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, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -90427,13 +87857,9 @@ func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -90624,13 +88050,9 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -90812,13 +88234,9 @@ func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Res 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, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -91002,13 +88420,9 @@ func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt st } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -91187,13 +88601,9 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt strin } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -91372,13 +88782,9 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (* } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -91537,13 +88943,9 @@ func (c *RegionInstanceGroupManagersTestIamPermissionsCall) doRequest(alt string } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -91722,13 +89124,9 @@ func (c *RegionInstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -91893,13 +89291,9 @@ func (c *RegionInstanceGroupsGetCall) 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, "{project}/regions/{region}/instanceGroups/{instanceGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -92119,13 +89513,9 @@ func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -92378,13 +89768,9 @@ func (c *RegionInstanceGroupsListInstancesCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -92603,13 +89989,9 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -92768,13 +90150,9 @@ func (c *RegionInstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*htt } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -92924,13 +90302,9 @@ func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, erro 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, "{project}/regions/{region}/operations/{operation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -93062,13 +90436,9 @@ func (c *RegionOperationsGetCall) 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, "{project}/regions/{region}/operations/{operation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -93291,13 +90661,9 @@ func (c *RegionOperationsListCall) 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, "{project}/regions/{region}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -93492,13 +90858,9 @@ func (c *RegionsGetCall) 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, "{project}/regions/{region}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -93710,13 +91072,9 @@ func (c *RegionsListCall) 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, "{project}/regions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -93961,13 +91319,9 @@ func (c *ResourcePoliciesAggregatedListCall) 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, "{project}/aggregated/resourcePolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -94158,13 +91512,9 @@ func (c *ResourcePoliciesDeleteCall) doRequest(alt string) (*http.Response, erro 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, "{project}/regions/{region}/resourcePolicies/{resourcePolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -94328,13 +91678,9 @@ func (c *ResourcePoliciesGetCall) 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, "{project}/regions/{region}/resourcePolicies/{resourcePolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -94504,13 +91850,9 @@ func (c *ResourcePoliciesInsertCall) 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, "{project}/regions/{region}/resourcePolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -94730,13 +92072,9 @@ func (c *ResourcePoliciesListCall) 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, "{project}/regions/{region}/resourcePolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -94746,13 +92084,13 @@ func (c *ResourcePoliciesListCall) doRequest(alt string) (*http.Response, error) } // Do executes the "compute.resourcePolicies.list" call. -// Exactly one of *ResourcePolicyList or error will be non-nil. Any +// Exactly one of *ResourcePoliciesList or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *ResourcePolicyList.ServerResponse.Header or (if a response was +// *ResourcePoliciesList.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 *ResourcePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResourcePolicyList, error) { +func (c *ResourcePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResourcePoliciesList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -94771,7 +92109,7 @@ func (c *ResourcePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResourcePo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ResourcePolicyList{ + ret := &ResourcePoliciesList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -94831,7 +92169,7 @@ func (c *ResourcePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResourcePo // }, // "path": "{project}/regions/{region}/resourcePolicies", // "response": { - // "$ref": "ResourcePolicyList" + // "$ref": "ResourcePoliciesList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -94845,7 +92183,7 @@ func (c *ResourcePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResourcePo // 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 *ResourcePoliciesListCall) Pages(ctx context.Context, f func(*ResourcePolicyList) error) error { +func (c *ResourcePoliciesListCall) Pages(ctx context.Context, f func(*ResourcePoliciesList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -94925,13 +92263,9 @@ func (c *ResourcePoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Re } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/resourcePolicies/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -95153,13 +92487,9 @@ func (c *RoutersAggregatedListCall) 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, "{project}/aggregated/routers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -95350,13 +92680,9 @@ func (c *RoutersDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/regions/{region}/routers/{router}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -95521,13 +92847,9 @@ func (c *RoutersGetCall) 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, "{project}/regions/{region}/routers/{router}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -95619,280 +92941,6 @@ func (c *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, error) { } -// method id "compute.routers.getNatMappingInfo": - -type RoutersGetNatMappingInfoCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetNatMappingInfo: Retrieves runtime Nat mapping information of VM -// endpoints. -func (r *RoutersService) GetNatMappingInfo(project string, region string, router string) *RoutersGetNatMappingInfoCall { - c := &RoutersGetNatMappingInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. The expression must specify -// the field name, a comparison operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The comparison 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. -// -// 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). -func (c *RoutersGetNatMappingInfoCall) Filter(filter string) *RoutersGetNatMappingInfoCall { - 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 *RoutersGetNatMappingInfoCall) MaxResults(maxResults int64) *RoutersGetNatMappingInfoCall { - 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 *RoutersGetNatMappingInfoCall) OrderBy(orderBy string) *RoutersGetNatMappingInfoCall { - 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 *RoutersGetNatMappingInfoCall) PageToken(pageToken string) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersGetNatMappingInfoCall) Fields(s ...googleapi.Field) *RoutersGetNatMappingInfoCall { - 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 *RoutersGetNatMappingInfoCall) IfNoneMatch(entityTag string) *RoutersGetNatMappingInfoCall { - 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 *RoutersGetNatMappingInfoCall) Context(ctx context.Context) *RoutersGetNatMappingInfoCall { - 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 *RoutersGetNatMappingInfoCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetNatMappingInfoCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}/getNatMappingInfo") - 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, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.getNatMappingInfo" call. -// Exactly one of *VmEndpointNatMappingsList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *VmEndpointNatMappingsList.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 *RoutersGetNatMappingInfoCall) Do(opts ...googleapi.CallOption) (*VmEndpointNatMappingsList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &VmEndpointNatMappingsList{ - 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 runtime Nat mapping information of VM endpoints.", - // "httpMethod": "GET", - // "id": "compute.routers.getNatMappingInfo", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou 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.\n\nTo 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).", - // "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.\n\nYou 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.\n\nCurrently, 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" - // }, - // "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" - // }, - // "router": { - // "description": "Name of the Router resource to query for Nat Mapping information of VM endpoints.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}/getNatMappingInfo", - // "response": { - // "$ref": "VmEndpointNatMappingsList" - // }, - // "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 *RoutersGetNatMappingInfoCall) Pages(ctx context.Context, f func(*VmEndpointNatMappingsList) 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.routers.getRouterStatus": type RoutersGetRouterStatusCall struct { @@ -95962,13 +93010,9 @@ func (c *RoutersGetRouterStatusCall) doRequest(alt string) (*http.Response, erro } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}/getRouterStatus") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -96139,13 +93183,9 @@ func (c *RoutersInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -96365,13 +93405,9 @@ func (c *RoutersListCall) 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, "{project}/regions/{region}/routers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -96580,13 +93616,9 @@ func (c *RoutersPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -96748,13 +93780,9 @@ func (c *RoutersPreviewCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}/preview") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -96911,13 +93939,9 @@ func (c *RoutersTestIamPermissionsCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -97093,13 +94117,9 @@ func (c *RoutersUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -97270,13 +94290,9 @@ func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/routes/{route}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -97431,13 +94447,9 @@ func (c *RoutesGetCall) 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, "{project}/global/routes/{route}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -97598,13 +94610,9 @@ func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -97814,13 +94822,9 @@ func (c *RoutesListCall) 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, "{project}/global/routes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -97998,13 +95002,9 @@ func (c *RoutesTestIamPermissionsCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -98111,13 +95111,6 @@ func (r *SecurityPoliciesService) AddRule(project string, securityPolicy string, return c } -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *SecurityPoliciesAddRuleCall) ValidateOnly(validateOnly bool) *SecurityPoliciesAddRuleCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -98156,13 +95149,9 @@ func (c *SecurityPoliciesAddRuleCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}/addRule") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -98230,11 +95219,6 @@ func (c *SecurityPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operati // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" - // }, - // "validateOnly": { - // "description": "If true, the request will not be committed.", - // "location": "query", - // "type": "boolean" // } // }, // "path": "{project}/global/securityPolicies/{securityPolicy}/addRule", @@ -98323,13 +95307,9 @@ func (c *SecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, erro 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, "{project}/global/securityPolicies/{securityPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -98483,13 +95463,9 @@ func (c *SecurityPoliciesGetCall) 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, "{project}/global/securityPolicies/{securityPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -98645,13 +95621,9 @@ func (c *SecurityPoliciesGetRuleCall) 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, "{project}/global/securityPolicies/{securityPolicy}/getRule") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -98779,13 +95751,6 @@ func (c *SecurityPoliciesInsertCall) RequestId(requestId string) *SecurityPolici return c } -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *SecurityPoliciesInsertCall) ValidateOnly(validateOnly bool) *SecurityPoliciesInsertCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -98824,13 +95789,9 @@ func (c *SecurityPoliciesInsertCall) 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, "{project}/global/securityPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -98894,11 +95855,6 @@ func (c *SecurityPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "validateOnly": { - // "description": "If true, the request will not be committed.", - // "location": "query", - // "type": "boolean" // } // }, // "path": "{project}/global/securityPolicies", @@ -99044,13 +96000,9 @@ func (c *SecurityPoliciesListCall) 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, "{project}/global/securityPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -99296,13 +96248,9 @@ func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) doRequest(alt stri } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/listPreconfiguredExpressionSets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -99480,13 +96428,9 @@ func (c *SecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -99604,13 +96548,6 @@ func (c *SecurityPoliciesPatchRuleCall) Priority(priority int64) *SecurityPolici return c } -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *SecurityPoliciesPatchRuleCall) ValidateOnly(validateOnly bool) *SecurityPoliciesPatchRuleCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -99649,13 +96586,9 @@ func (c *SecurityPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}/patchRule") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -99729,11 +96662,6 @@ func (c *SecurityPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Opera // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" - // }, - // "validateOnly": { - // "description": "If true, the request will not be committed.", - // "location": "query", - // "type": "boolean" // } // }, // "path": "{project}/global/securityPolicies/{securityPolicy}/patchRule", @@ -99810,13 +96738,9 @@ func (c *SecurityPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, 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, "{project}/global/securityPolicies/{securityPolicy}/removeRule") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -99964,13 +96888,9 @@ func (c *SecurityPoliciesSetLabelsCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -100115,13 +97035,9 @@ func (c *SecurityPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Re } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -100285,13 +97201,9 @@ func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/snapshots/{snapshot}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -100446,13 +97358,9 @@ func (c *SnapshotsGetCall) 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, "{project}/global/snapshots/{snapshot}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -100602,13 +97510,9 @@ func (c *SnapshotsGetIamPolicyCall) 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, "{project}/global/snapshots/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -100820,13 +97724,9 @@ func (c *SnapshotsListCall) 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, "{project}/global/snapshots") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -101004,13 +97904,9 @@ func (c *SnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -101155,13 +98051,9 @@ func (c *SnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -101306,13 +98198,9 @@ func (c *SnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -101469,13 +98357,9 @@ func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error 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, "{project}/global/sslCertificates/{sslCertificate}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -101629,13 +98513,9 @@ func (c *SslCertificatesGetCall) 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, "{project}/global/sslCertificates/{sslCertificate}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -101795,13 +98675,9 @@ func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -102010,13 +98886,9 @@ func (c *SslCertificatesListCall) 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, "{project}/global/sslCertificates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -102194,13 +99066,9 @@ func (c *SslCertificatesTestIamPermissionsCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -102359,13 +99227,9 @@ func (c *SslPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/sslPolicies/{sslPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -102518,13 +99382,9 @@ func (c *SslPoliciesGetCall) 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, "{project}/global/sslPolicies/{sslPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -102683,13 +99543,9 @@ func (c *SslPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -102898,13 +99754,9 @@ func (c *SslPoliciesListCall) 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, "{project}/global/sslPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -103150,13 +100002,9 @@ func (c *SslPoliciesListAvailableFeaturesCall) doRequest(alt string) (*http.Resp } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslPolicies/listAvailableFeatures") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -103334,13 +100182,9 @@ func (c *SslPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslPolicies/{sslPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -103489,13 +100333,9 @@ func (c *SslPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslPolicies/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -103708,13 +100548,9 @@ func (c *SubnetworksAggregatedListCall) 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, "{project}/aggregated/subnetworks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -103905,13 +100741,9 @@ func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/regions/{region}/subnetworks/{subnetwork}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -104088,13 +100920,9 @@ func (c *SubnetworksExpandIpCidrRangeCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -104262,13 +101090,9 @@ func (c *SubnetworksGetCall) 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, "{project}/regions/{region}/subnetworks/{subnetwork}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -104429,13 +101253,9 @@ func (c *SubnetworksGetIamPolicyCall) 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, "{project}/regions/{region}/subnetworks/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -104606,13 +101426,9 @@ func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -104832,13 +101648,9 @@ func (c *SubnetworksListCall) 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, "{project}/regions/{region}/subnetworks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -105092,13 +101904,9 @@ func (c *SubnetworksListUsableCall) 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, "{project}/aggregated/subnetworks/listUsable") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -105301,13 +102109,9 @@ func (c *SubnetworksPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -105468,13 +102272,9 @@ func (c *SubnetworksSetIamPolicyCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -105650,13 +102450,9 @@ func (c *SubnetworksSetPrivateIpGoogleAccessCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -105817,13 +102613,9 @@ func (c *SubnetworksTestIamPermissionsCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -105990,13 +102782,9 @@ func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, err 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, "{project}/global/targetHttpProxies/{targetHttpProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -106151,13 +102939,9 @@ func (c *TargetHttpProxiesGetCall) 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, "{project}/global/targetHttpProxies/{targetHttpProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -106318,13 +103102,9 @@ func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -106534,13 +103314,9 @@ func (c *TargetHttpProxiesListCall) 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, "{project}/global/targetHttpProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -106737,13 +103513,9 @@ func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -106893,13 +103665,9 @@ func (c *TargetHttpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -107056,13 +103824,9 @@ func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, er 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, "{project}/global/targetHttpsProxies/{targetHttpsProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -107216,13 +103980,9 @@ func (c *TargetHttpsProxiesGetCall) 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, "{project}/global/targetHttpsProxies/{targetHttpsProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -107382,13 +104142,9 @@ func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -107597,13 +104353,9 @@ func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, erro } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -107799,13 +104551,9 @@ func (c *TargetHttpsProxiesSetQuicOverrideCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -107972,13 +104720,9 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http. } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -108150,13 +104894,9 @@ func (c *TargetHttpsProxiesSetSslPolicyCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}/setSslPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -108323,13 +105063,9 @@ func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -108479,13 +105215,9 @@ func (c *TargetHttpsProxiesTestIamPermissionsCall) doRequest(alt string) (*http. } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -108699,13 +105431,9 @@ func (c *TargetInstancesAggregatedListCall) 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, "{project}/aggregated/targetInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -108897,13 +105625,9 @@ func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error 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, "{project}/zones/{zone}/targetInstances/{targetInstance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -109069,13 +105793,9 @@ func (c *TargetInstancesGetCall) 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, "{project}/zones/{zone}/targetInstances/{targetInstance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -109247,13 +105967,9 @@ func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -109474,13 +106190,9 @@ func (c *TargetInstancesListCall) 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, "{project}/zones/{zone}/targetInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -109669,13 +106381,9 @@ func (c *TargetInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -109851,13 +106559,9 @@ func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -110037,13 +106741,9 @@ func (c *TargetPoolsAddInstanceCall) 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, "{project}/regions/{region}/targetPools/{targetPool}/addInstance") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -110270,13 +106970,9 @@ func (c *TargetPoolsAggregatedListCall) 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, "{project}/aggregated/targetPools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -110468,13 +107164,9 @@ func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/regions/{region}/targetPools/{targetPool}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -110640,13 +107332,9 @@ func (c *TargetPoolsGetCall) 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, "{project}/regions/{region}/targetPools/{targetPool}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -110801,13 +107489,9 @@ func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/getHealth") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -110982,13 +107666,9 @@ func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -111209,13 +107889,9 @@ func (c *TargetPoolsListCall) 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, "{project}/regions/{region}/targetPools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -111423,13 +108099,9 @@ func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -111609,13 +108281,9 @@ func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeInstance") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -111802,13 +108470,9 @@ func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/setBackup") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -111975,13 +108639,9 @@ func (c *TargetPoolsTestIamPermissionsCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -112147,13 +108807,9 @@ func (c *TargetSslProxiesDeleteCall) doRequest(alt string) (*http.Response, erro 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, "{project}/global/targetSslProxies/{targetSslProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -112307,13 +108963,9 @@ func (c *TargetSslProxiesGetCall) 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, "{project}/global/targetSslProxies/{targetSslProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -112473,13 +109125,9 @@ func (c *TargetSslProxiesInsertCall) 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, "{project}/global/targetSslProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -112688,13 +109336,9 @@ func (c *TargetSslProxiesListCall) 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, "{project}/global/targetSslProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -112890,13 +109534,9 @@ func (c *TargetSslProxiesSetBackendServiceCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -113064,13 +109704,9 @@ func (c *TargetSslProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -113238,13 +109874,9 @@ func (c *TargetSslProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Re } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -113415,13 +110047,9 @@ func (c *TargetSslProxiesSetSslPolicyCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setSslPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -113570,13 +110198,9 @@ func (c *TargetSslProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Re } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -113733,13 +110357,9 @@ func (c *TargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, erro 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, "{project}/global/targetTcpProxies/{targetTcpProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -113893,13 +110513,9 @@ func (c *TargetTcpProxiesGetCall) 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, "{project}/global/targetTcpProxies/{targetTcpProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -114059,13 +110675,9 @@ func (c *TargetTcpProxiesInsertCall) 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, "{project}/global/targetTcpProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -114274,13 +110886,9 @@ func (c *TargetTcpProxiesListCall) 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, "{project}/global/targetTcpProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -114476,13 +111084,9 @@ func (c *TargetTcpProxiesSetBackendServiceCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -114650,13 +111254,9 @@ func (c *TargetTcpProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -114873,13 +111473,9 @@ func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Respo } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetVpnGateways") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -115070,13 +111666,9 @@ func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, err 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, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -115241,13 +111833,9 @@ func (c *TargetVpnGatewaysGetCall) 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, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -115418,13 +112006,9 @@ func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -115644,13 +112228,9 @@ func (c *TargetVpnGatewaysListCall) 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, "{project}/regions/{region}/targetVpnGateways") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -115858,13 +112438,9 @@ func (c *TargetVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -116025,13 +112601,9 @@ func (c *TargetVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -116198,13 +112770,9 @@ func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/urlMaps/{urlMap}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -116359,13 +112927,9 @@ func (c *UrlMapsGetCall) 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, "{project}/global/urlMaps/{urlMap}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -116526,13 +113090,9 @@ func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -116692,13 +113252,9 @@ func (c *UrlMapsInvalidateCacheCall) 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, "{project}/global/urlMaps/{urlMap}/invalidateCache") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -116917,13 +113473,9 @@ func (c *UrlMapsListCall) 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, "{project}/global/urlMaps") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -117122,13 +113674,9 @@ func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -117278,13 +113826,9 @@ func (c *UrlMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -117450,13 +113994,9 @@ func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -117608,13 +114148,9 @@ func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/validate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -117826,13 +114362,9 @@ func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/vpnTunnels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -118023,13 +114555,9 @@ func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -118194,13 +114722,9 @@ func (c *VpnTunnelsGetCall) 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, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -118371,13 +114895,9 @@ func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -118597,13 +115117,9 @@ func (c *VpnTunnelsListCall) 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, "{project}/regions/{region}/vpnTunnels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -118811,13 +115327,9 @@ func (c *VpnTunnelsSetLabelsCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -118978,13 +115490,9 @@ func (c *VpnTunnelsTestIamPermissionsCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -119134,13 +115642,9 @@ func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) 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, "{project}/zones/{zone}/operations/{operation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -119272,13 +115776,9 @@ func (c *ZoneOperationsGetCall) 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, "{project}/zones/{zone}/operations/{operation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -119501,13 +116001,9 @@ func (c *ZoneOperationsListCall) 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, "{project}/zones/{zone}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -119702,13 +116198,9 @@ func (c *ZonesGetCall) 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, "{project}/zones/{zone}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -119920,13 +116412,9 @@ func (c *ZonesListCall) 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, "{project}/zones") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, diff --git a/vendor/google.golang.org/api/compute/v1/compute-api.json b/vendor/google.golang.org/api/compute/v1/compute-api.json index 5ce26c38..6168f9c5 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-api.json +++ b/vendor/google.golang.org/api/compute/v1/compute-api.json @@ -29,7 +29,7 @@ "description": "Creates and runs virtual machines on Google Cloud Platform.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/r9hRWZel6GOAdJ-acDw6uQoAlog\"", + "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/YNEYVcvvIGNMtQqDhq2IeA4gjxw\"", "icons": { "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" @@ -5691,7 +5691,7 @@ "instance": { "description": "Name of the instance resource to return.", "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" }, @@ -5799,7 +5799,7 @@ "type": "string" }, "sourceInstanceTemplate": { - "description": "Specifies instance template to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: \n- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate \n- projects/project/global/instanceTemplates/instanceTemplate \n- global/instanceTemplates/instanceTemplate", + "description": "Specifies instance template to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: \n- https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate \n- projects/project/global/global/instanceTemplates/instanceTemplate \n- global/instancesTemplates/instanceTemplate", "location": "query", "type": "string" }, @@ -16497,7 +16497,7 @@ } } }, - "revision": "20181017", + "revision": "20180817", "rootUrl": "https://www.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -19268,10 +19268,6 @@ "description": "Represents a customer-supplied encryption key", "id": "CustomerEncryptionKey", "properties": { - "kmsKeyName": { - "description": "The name of the encryption key that is stored in Google Cloud KMS.", - "type": "string" - }, "rawKey": { "description": "Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.", "type": "string" @@ -20543,7 +20539,7 @@ "id": "ForwardingRule", "properties": { "IPAddress": { - "description": "The IP address that this forwarding rule is serving on behalf of.\n\nAddresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional).\n\nWhen the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6.\n\nWhen the load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL reference to an existing Address resource ( internal regional static IP address), with a purpose of GCE_END_POINT and address_type of INTERNAL.\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule.\n\nAn address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: \n- 100.1.2.3 \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address \n- projects/project/regions/region/addresses/address \n- regions/region/addresses/address \n- global/addresses/address \n- address", + "description": "The IP address that this forwarding rule is serving on behalf of.\n\nAddresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional).\n\nWhen the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6.\n\nWhen the load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL reference to an existing Address resource ( internal regional static IP address).\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule.\n\nAn address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: \n- 100.1.2.3 \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address \n- projects/project/regions/region/addresses/address \n- regions/region/addresses/address \n- global/addresses/address \n- address", "type": "string" }, "IPProtocol": { @@ -21061,10 +21057,6 @@ "requestPath": { "description": "The request path of the HTTP health check request. The default value is /.", "type": "string" - }, - "response": { - "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII.", - "type": "string" } }, "type": "object" @@ -21100,10 +21092,6 @@ "requestPath": { "description": "The request path of the HTTPS health check request. The default value is /.", "type": "string" - }, - "response": { - "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII.", - "type": "string" } }, "type": "object" @@ -25254,7 +25242,7 @@ "compute.images.insert" ] }, - "description": "Name of the resource. The name must be 1-63 characters long and comply with RFC1035.", + "description": "[Output Only] Name of the resource. The name is 1-63 characters long and complies with RFC1035.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, @@ -26043,7 +26031,7 @@ "type": "object" }, "Network": { - "description": "Represents a Network resource. Read Virtual Private Cloud (VPC) Network Overview for more information. (== resource_for v1.networks ==) (== resource_for beta.networks ==)", + "description": "Represents a Network resource. Read Networks and Firewalls for more information. (== resource_for v1.networks ==) (== resource_for beta.networks ==)", "id": "Network", "properties": { "IPv4Range": { @@ -26052,7 +26040,7 @@ "type": "string" }, "autoCreateSubnetworks": { - "description": "When set to true, the VPC network is created in \"auto\" mode. When set to false, the VPC network is created in \"custom\" mode.\n\nAn auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described in Auto mode VPC network IP ranges.", + "description": "When set to true, the network is created in \"auto subnet mode\". When set to false, the network is in \"custom subnet mode\".\n\nIn \"auto subnet mode\", a newly created network is assigned the default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork per region.", "type": "boolean" }, "creationTimestamp": { @@ -26064,7 +26052,7 @@ "type": "string" }, "gatewayIPv4": { - "description": "[Output Only] The gateway address for default routing out of the network. This value is read only and is selected by GCP.", + "description": "A gateway address for default routing to other networks. This value is read only and is selected by the Google Compute Engine, typically as the first usable address in the IPv4Range.", "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}", "type": "string" }, @@ -26104,7 +26092,7 @@ "type": "string" }, "subnetworks": { - "description": "[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network.", + "description": "[Output Only] Server-defined fully-qualified URLs for all subnetworks in this network.", "items": { "type": "string" }, @@ -26312,7 +26300,7 @@ "id": "NetworkRoutingConfig", "properties": { "routingMode": { - "description": "The network-wide routing mode to use. If set to REGIONAL, this network's cloud routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's cloud routers will advertise routes with all subnets of this network, across regions.", + "description": "The network-wide routing mode to use. If set to REGIONAL, this network's cloud routers will only advertise routes with subnetworks of this network in the same region as the router. If set to GLOBAL, this network's cloud routers will advertise routes with all subnetworks of this network, across regions.", "enum": [ "GLOBAL", "REGIONAL" @@ -28455,7 +28443,6 @@ "DISKS_TOTAL_GB", "FIREWALLS", "FORWARDING_RULES", - "GLOBAL_INTERNAL_ADDRESSES", "GPUS_ALL_REGIONS", "HEALTH_CHECKS", "IMAGES", @@ -28476,8 +28463,6 @@ "NVIDIA_P100_VWS_GPUS", "NVIDIA_P4_GPUS", "NVIDIA_P4_VWS_GPUS", - "NVIDIA_T4_GPUS", - "NVIDIA_T4_VWS_GPUS", "NVIDIA_V100_GPUS", "PREEMPTIBLE_CPUS", "PREEMPTIBLE_LOCAL_SSD_GB", @@ -28486,8 +28471,6 @@ "PREEMPTIBLE_NVIDIA_P100_VWS_GPUS", "PREEMPTIBLE_NVIDIA_P4_GPUS", "PREEMPTIBLE_NVIDIA_P4_VWS_GPUS", - "PREEMPTIBLE_NVIDIA_T4_GPUS", - "PREEMPTIBLE_NVIDIA_T4_VWS_GPUS", "PREEMPTIBLE_NVIDIA_V100_GPUS", "REGIONAL_AUTOSCALERS", "REGIONAL_INSTANCE_GROUP_MANAGERS", @@ -28570,11 +28553,6 @@ "", "", "", - "", - "", - "", - "", - "", "" ], "type": "string" @@ -31606,7 +31584,7 @@ "type": "string" }, "enableFlowLogs": { - "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is to disable flow logging.", + "description": "Whether to enable flow logging for this subnetwork.", "type": "boolean" }, "fingerprint": { diff --git a/vendor/google.golang.org/api/compute/v1/compute-gen.go b/vendor/google.golang.org/api/compute/v1/compute-gen.go index 80d2c852..0d8d6ba8 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v1/compute-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -4878,10 +4877,6 @@ func (s *ConnectionDraining) MarshalJSON() ([]byte, error) { // CustomerEncryptionKey: Represents a customer-supplied encryption key type CustomerEncryptionKey struct { - // KmsKeyName: The name of the encryption key that is stored in Google - // Cloud KMS. - KmsKeyName string `json:"kmsKeyName,omitempty"` - // RawKey: Specifies a 256-bit customer-supplied encryption key, encoded // in RFC 4648 base64 to either encrypt or decrypt this resource. RawKey string `json:"rawKey,omitempty"` @@ -4890,7 +4885,7 @@ type CustomerEncryptionKey struct { // customer-supplied encryption key that protects this resource. Sha256 string `json:"sha256,omitempty"` - // ForceSendFields is a list of field names (e.g. "KmsKeyName") to + // ForceSendFields is a list of field names (e.g. "RawKey") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -4898,8 +4893,8 @@ type CustomerEncryptionKey struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "KmsKeyName") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "RawKey") 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. @@ -6806,8 +6801,7 @@ type ForwardingRule struct { // // When the load balancing scheme is INTERNAL_SELF_MANAGED, this must be // a URL reference to an existing Address resource ( internal regional - // static IP address), with a purpose of GCE_END_POINT and address_type - // of INTERNAL. + // static IP address). // // When the load balancing scheme is INTERNAL, this can only be an RFC // 1918 IP address belonging to the network/subnet configured for the @@ -7562,11 +7556,6 @@ type HTTPHealthCheck struct { // default value is /. RequestPath string `json:"requestPath,omitempty"` - // Response: The string to match anywhere in the first 1024 bytes of the - // response body. If left empty (the default value), the status code - // determines health. The response data can only be ASCII. - 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 values are omitted from API requests. However, any non-pointer, @@ -7617,11 +7606,6 @@ type HTTPSHealthCheck struct { // default value is /. RequestPath string `json:"requestPath,omitempty"` - // Response: The string to match anywhere in the first 1024 bytes of the - // response body. If left empty (the default value), the status code - // determines health. The response data can only be ASCII. - 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 values are omitted from API requests. However, any non-pointer, @@ -13402,8 +13386,8 @@ type License struct { // license to images, snapshots, and disks. LicenseCode uint64 `json:"licenseCode,omitempty,string"` - // Name: Name of the resource. The name must be 1-63 characters long and - // comply with RFC1035. + // Name: [Output Only] Name of the resource. The name is 1-63 characters + // long and complies with RFC1035. Name string `json:"name,omitempty"` ResourceRequirements *LicenseResourceRequirements `json:"resourceRequirements,omitempty"` @@ -14583,22 +14567,22 @@ func (s *NamedPort) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Network: Represents a Network resource. Read Virtual Private Cloud -// (VPC) Network Overview for more information. (== resource_for -// v1.networks ==) (== resource_for beta.networks ==) +// Network: Represents a Network resource. Read Networks and Firewalls +// for more information. (== resource_for v1.networks ==) (== +// resource_for beta.networks ==) type Network struct { // IPv4Range: The range of internal addresses that are legal on this // network. This range is a CIDR specification, for example: // 192.168.0.0/16. Provided by the client when the network is created. IPv4Range string `json:"IPv4Range,omitempty"` - // AutoCreateSubnetworks: When set to true, the VPC network is created - // in "auto" mode. When set to false, the VPC network is created in - // "custom" mode. + // AutoCreateSubnetworks: When set to true, the network is created in + // "auto subnet mode". When set to false, the network is in "custom + // subnet mode". // - // An auto mode VPC network starts with one subnet per region. Each - // subnet has a predetermined range as described in Auto mode VPC - // network IP ranges. + // In "auto subnet mode", a newly created network is assigned the + // default CIDR of 10.128.0.0/9 and it automatically creates one + // subnetwork per region. AutoCreateSubnetworks bool `json:"autoCreateSubnetworks,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -14609,8 +14593,9 @@ type Network struct { // property when you create the resource. Description string `json:"description,omitempty"` - // GatewayIPv4: [Output Only] The gateway address for default routing - // out of the network. This value is read only and is selected by GCP. + // GatewayIPv4: A gateway address for default routing to other networks. + // This value is read only and is selected by the Google Compute Engine, + // typically as the first usable address in the IPv4Range. GatewayIPv4 string `json:"gatewayIPv4,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -14642,7 +14627,7 @@ type Network struct { SelfLink string `json:"selfLink,omitempty"` // Subnetworks: [Output Only] Server-defined fully-qualified URLs for - // all subnetworks in this VPC network. + // all subnetworks in this network. Subnetworks []string `json:"subnetworks,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -14982,9 +14967,9 @@ func (s *NetworkPeering) MarshalJSON() ([]byte, error) { type NetworkRoutingConfig struct { // RoutingMode: The network-wide routing mode to use. If set to // REGIONAL, this network's cloud routers will only advertise routes - // with subnets of this network in the same region as the router. If set - // to GLOBAL, this network's cloud routers will advertise routes with - // all subnets of this network, across regions. + // with subnetworks of this network in the same region as the router. If + // set to GLOBAL, this network's cloud routers will advertise routes + // with all subnetworks of this network, across regions. // // Possible values: // "GLOBAL" @@ -18064,7 +18049,6 @@ type Quota struct { // "DISKS_TOTAL_GB" // "FIREWALLS" // "FORWARDING_RULES" - // "GLOBAL_INTERNAL_ADDRESSES" // "GPUS_ALL_REGIONS" // "HEALTH_CHECKS" // "IMAGES" @@ -18085,8 +18069,6 @@ type Quota struct { // "NVIDIA_P100_VWS_GPUS" // "NVIDIA_P4_GPUS" // "NVIDIA_P4_VWS_GPUS" - // "NVIDIA_T4_GPUS" - // "NVIDIA_T4_VWS_GPUS" // "NVIDIA_V100_GPUS" // "PREEMPTIBLE_CPUS" // "PREEMPTIBLE_LOCAL_SSD_GB" @@ -18095,8 +18077,6 @@ type Quota struct { // "PREEMPTIBLE_NVIDIA_P100_VWS_GPUS" // "PREEMPTIBLE_NVIDIA_P4_GPUS" // "PREEMPTIBLE_NVIDIA_P4_VWS_GPUS" - // "PREEMPTIBLE_NVIDIA_T4_GPUS" - // "PREEMPTIBLE_NVIDIA_T4_VWS_GPUS" // "PREEMPTIBLE_NVIDIA_V100_GPUS" // "REGIONAL_AUTOSCALERS" // "REGIONAL_INSTANCE_GROUP_MANAGERS" @@ -22529,8 +22509,6 @@ type Subnetwork struct { Description string `json:"description,omitempty"` // EnableFlowLogs: Whether to enable flow logging for this subnetwork. - // If this field is not explicitly set, it will not appear in get - // listings. If not set the default behavior is to disable flow logging. EnableFlowLogs bool `json:"enableFlowLogs,omitempty"` // Fingerprint: Fingerprint of this resource. A hash of the contents @@ -28137,13 +28115,9 @@ func (c *AcceleratorTypesAggregatedListCall) 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, "{project}/aggregated/acceleratorTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -28329,13 +28303,9 @@ 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, "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -28557,13 +28527,9 @@ func (c *AcceleratorTypesListCall) 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, "{project}/zones/{zone}/acceleratorTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -28818,13 +28784,9 @@ 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, "{project}/aggregated/addresses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -29016,13 +28978,9 @@ func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/regions/{region}/addresses/{address}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -29187,13 +29145,9 @@ func (c *AddressesGetCall) 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, "{project}/regions/{region}/addresses/{address}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -29365,13 +29319,9 @@ func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -29592,13 +29542,9 @@ 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, "{project}/regions/{region}/addresses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -29852,13 +29798,9 @@ 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, "{project}/aggregated/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -30049,13 +29991,9 @@ func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/zones/{zone}/autoscalers/{autoscaler}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -30220,13 +30158,9 @@ func (c *AutoscalersGetCall) 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, "{project}/zones/{zone}/autoscalers/{autoscaler}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -30397,13 +30331,9 @@ func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -30623,13 +30553,9 @@ func (c *AutoscalersListCall) 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, "{project}/zones/{zone}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -30843,13 +30769,9 @@ func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -31031,13 +30953,9 @@ func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -31212,13 +31130,9 @@ func (c *BackendBucketsAddSignedUrlKeyCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -31378,13 +31292,9 @@ func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) 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, "{project}/global/backendBuckets/{backendBucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -31544,13 +31454,9 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Resp 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, "{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -31710,13 +31616,9 @@ func (c *BackendBucketsGetCall) 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, "{project}/global/backendBuckets/{backendBucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -31876,13 +31778,9 @@ func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -32091,13 +31989,9 @@ func (c *BackendBucketsListCall) 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, "{project}/global/backendBuckets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -32295,13 +32189,9 @@ func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -32470,13 +32360,9 @@ func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -32645,13 +32531,9 @@ func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/addSignedUrlKey") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -32868,13 +32750,9 @@ func (c *BackendServicesAggregatedListCall) 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, "{project}/aggregated/backendServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -33064,13 +32942,9 @@ func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error 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, "{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -33230,13 +33104,9 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Res 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, "{project}/global/backendServices/{backendService}/deleteSignedUrlKey") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -33397,13 +33267,9 @@ 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, "{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -33547,13 +33413,9 @@ func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/getHealth") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -33718,13 +33580,9 @@ func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -33934,13 +33792,9 @@ func (c *BackendServicesListCall) 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, "{project}/global/backendServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -34142,13 +33996,9 @@ func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -34317,13 +34167,9 @@ func (c *BackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/setSecurityPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -34494,13 +34340,9 @@ func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -34718,13 +34560,9 @@ 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, "{project}/aggregated/diskTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -34912,13 +34750,9 @@ func (c *DiskTypesGetCall) 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, "{project}/zones/{zone}/diskTypes/{diskType}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -35141,13 +34975,9 @@ func (c *DiskTypesListCall) 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, "{project}/zones/{zone}/diskTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -35402,13 +35232,9 @@ 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, "{project}/aggregated/disks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -35613,13 +35439,9 @@ func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/createSnapshot") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -35799,13 +35621,9 @@ func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/zones/{zone}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -35970,13 +35788,9 @@ func (c *DisksGetCall) 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, "{project}/zones/{zone}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -36158,13 +35972,9 @@ func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -36390,13 +36200,9 @@ func (c *DisksListCall) 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, "{project}/zones/{zone}/disks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -36604,13 +36410,9 @@ func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/resize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -36790,13 +36592,9 @@ func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -36967,13 +36765,9 @@ func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/firewalls/{firewall}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -37127,13 +36921,9 @@ func (c *FirewallsGetCall) 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, "{project}/global/firewalls/{firewall}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -37294,13 +37084,9 @@ func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -37510,13 +37296,9 @@ 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, "{project}/global/firewalls") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -37715,13 +37497,9 @@ func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -37893,13 +37671,9 @@ func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -38117,13 +37891,9 @@ 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, "{project}/aggregated/forwardingRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -38315,13 +38085,9 @@ func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error 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, "{project}/regions/{region}/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -38486,13 +38252,9 @@ func (c *ForwardingRulesGetCall) 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, "{project}/regions/{region}/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -38664,13 +38426,9 @@ func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -38891,13 +38649,9 @@ 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, "{project}/regions/{region}/forwardingRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -39106,13 +38860,9 @@ func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -39283,13 +39033,9 @@ func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error 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, "{project}/global/addresses/{address}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -39444,13 +39190,9 @@ func (c *GlobalAddressesGetCall) 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, "{project}/global/addresses/{address}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -39611,13 +39353,9 @@ func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -39826,13 +39564,9 @@ func (c *GlobalAddressesListCall) 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, "{project}/global/addresses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -40022,13 +39756,9 @@ func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, 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, "{project}/global/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -40183,13 +39913,9 @@ func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -40350,13 +40076,9 @@ func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -40566,13 +40288,9 @@ func (c *GlobalForwardingRulesListCall) 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, "{project}/global/forwardingRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -40770,13 +40488,9 @@ func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}/setTarget") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -40994,13 +40708,9 @@ func (c *GlobalOperationsAggregatedListCall) 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, "{project}/aggregated/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -41171,13 +40881,9 @@ func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, erro 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, "{project}/global/operations/{operation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -41299,13 +41005,9 @@ func (c *GlobalOperationsGetCall) 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, "{project}/global/operations/{operation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -41517,13 +41219,9 @@ func (c *GlobalOperationsListCall) 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, "{project}/global/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -41712,13 +41410,9 @@ func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -41872,13 +41566,9 @@ func (c *HealthChecksGetCall) 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, "{project}/global/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -42038,13 +41728,9 @@ func (c *HealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -42253,13 +41939,9 @@ func (c *HealthChecksListCall) 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, "{project}/global/healthChecks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -42457,13 +42139,9 @@ func (c *HealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -42632,13 +42310,9 @@ func (c *HealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -42800,13 +42474,9 @@ func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, erro 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, "{project}/global/httpHealthChecks/{httpHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -42961,13 +42631,9 @@ func (c *HttpHealthChecksGetCall) 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, "{project}/global/httpHealthChecks/{httpHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -43128,13 +42794,9 @@ func (c *HttpHealthChecksInsertCall) 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, "{project}/global/httpHealthChecks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -43344,13 +43006,9 @@ func (c *HttpHealthChecksListCall) 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, "{project}/global/httpHealthChecks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -43549,13 +43207,9 @@ func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -43725,13 +43379,9 @@ func (c *HttpHealthChecksUpdateCall) 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, "{project}/global/httpHealthChecks/{httpHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -43892,13 +43542,9 @@ func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, err 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, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -44052,13 +43698,9 @@ func (c *HttpsHealthChecksGetCall) 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, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -44218,13 +43860,9 @@ func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -44433,13 +44071,9 @@ func (c *HttpsHealthChecksListCall) 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, "{project}/global/httpsHealthChecks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -44637,13 +44271,9 @@ func (c *HttpsHealthChecksPatchCall) 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, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -44812,13 +44442,9 @@ func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -44980,13 +44606,9 @@ func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/images/{image}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -45155,13 +44777,9 @@ func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}/deprecate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -45319,13 +44937,9 @@ func (c *ImagesGetCall) 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, "{project}/global/images/{image}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -45475,13 +45089,9 @@ func (c *ImagesGetFromFamilyCall) 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, "{project}/global/images/family/{family}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -45649,13 +45259,9 @@ func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -45878,13 +45484,9 @@ func (c *ImagesListCall) 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, "{project}/global/images") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -46062,13 +45664,9 @@ func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -46249,13 +45847,9 @@ func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -46480,13 +46074,9 @@ func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.R } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instanceGroupManagers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -46681,13 +46271,9 @@ func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, 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, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -46876,13 +46462,9 @@ func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http. } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -47049,13 +46631,9 @@ func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -47232,13 +46810,9 @@ func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -47457,13 +47031,9 @@ func (c *InstanceGroupManagersListCall) 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, "{project}/zones/{zone}/instanceGroupManagers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -47711,13 +47281,9 @@ func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (* 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, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -47926,13 +47492,9 @@ func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*htt } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -48113,13 +47675,9 @@ func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, 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, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -48303,13 +47861,9 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*h } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -48492,13 +48046,9 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -48677,13 +48227,9 @@ func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -48908,13 +48454,9 @@ func (c *InstanceGroupsAggregatedListCall) 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, "{project}/aggregated/instanceGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -49108,13 +48650,9 @@ func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) 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, "{project}/zones/{zone}/instanceGroups/{instanceGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -49277,13 +48815,9 @@ func (c *InstanceGroupsGetCall) 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, "{project}/zones/{zone}/instanceGroups/{instanceGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -49452,13 +48986,9 @@ func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -49677,13 +49207,9 @@ func (c *InstanceGroupsListCall) 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, "{project}/zones/{zone}/instanceGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -49933,13 +49459,9 @@ func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -50161,13 +49683,9 @@ func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -50344,13 +49862,9 @@ func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -50521,13 +50035,9 @@ func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, err 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, "{project}/global/instanceTemplates/{instanceTemplate}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -50682,13 +50192,9 @@ func (c *InstanceTemplatesGetCall) 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, "{project}/global/instanceTemplates/{instanceTemplate}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -50852,13 +50358,9 @@ func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -51068,13 +50570,9 @@ func (c *InstanceTemplatesListCall) 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, "{project}/global/instanceTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -51275,13 +50773,9 @@ func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/addAccessConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -51516,13 +51010,9 @@ func (c *InstancesAggregatedListCall) 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, "{project}/aggregated/instances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -51732,13 +51222,9 @@ func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/attachDisk") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -51917,13 +51403,9 @@ func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/zones/{zone}/instances/{instance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -52096,13 +51578,9 @@ func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, 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, "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -52287,13 +51765,9 @@ func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) 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, "{project}/zones/{zone}/instances/{instance}/detachDisk") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -52466,13 +51940,9 @@ func (c *InstancesGetCall) 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, "{project}/zones/{zone}/instances/{instance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -52532,7 +52002,7 @@ func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { // "instance": { // "description": "Name of the instance resource to return.", // "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" // }, @@ -52652,13 +52122,9 @@ func (c *InstancesGetSerialPortOutputCall) 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, "{project}/zones/{zone}/instances/{instance}/serialPort") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -52814,9 +52280,10 @@ func (c *InstancesInsertCall) RequestId(requestId string) *InstancesInsertCall { // This field is optional. It can be a full or partial URL. For example, // the following are all valid URLs to an instance template: // - -// https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate -// - projects/project/global/instanceTemplates/instanceTemplate -// - global/instanceTemplates/instanceTemplate +// https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate +// - projects/project/global/global/instanceTemplates/instanceTemplate +// +// - global/instancesTemplates/instanceTemplate func (c *InstancesInsertCall) SourceInstanceTemplate(sourceInstanceTemplate string) *InstancesInsertCall { c.urlParams_.Set("sourceInstanceTemplate", sourceInstanceTemplate) return c @@ -52860,13 +52327,9 @@ func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -52934,7 +52397,7 @@ func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // }, // "sourceInstanceTemplate": { - // "description": "Specifies instance template to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: \n- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate \n- projects/project/global/instanceTemplates/instanceTemplate \n- global/instanceTemplates/instanceTemplate", + // "description": "Specifies instance template to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: \n- https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate \n- projects/project/global/global/instanceTemplates/instanceTemplate \n- global/instancesTemplates/instanceTemplate", // "location": "query", // "type": "string" // }, @@ -53092,13 +52555,9 @@ func (c *InstancesListCall) 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, "{project}/zones/{zone}/instances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -53357,13 +52816,9 @@ func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, erro } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/referrers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -53574,13 +53029,9 @@ func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/zones/{zone}/instances/{instance}/reset") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -53756,13 +53207,9 @@ func (c *InstancesSetDeletionProtectionCall) doRequest(alt string) (*http.Respon 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, "{project}/zones/{zone}/instances/{resource}/setDeletionProtection") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -53941,13 +53388,9 @@ func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, 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, "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -54139,13 +53582,9 @@ func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -54325,13 +53764,9 @@ func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineResources") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -54511,13 +53946,9 @@ func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineType") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -54698,13 +54129,9 @@ func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMetadata") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -54886,13 +54313,9 @@ func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -55072,13 +54495,9 @@ func (c *InstancesSetSchedulingCall) 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, "{project}/zones/{zone}/instances/{instance}/setScheduling") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -55259,13 +54678,9 @@ func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setServiceAccount") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -55446,13 +54861,9 @@ func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setTags") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -55606,13 +55017,9 @@ func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Res 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, "{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -55778,13 +55185,9 @@ func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/zones/{zone}/instances/{instance}/start") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -55962,13 +55365,9 @@ func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -56146,13 +55545,9 @@ func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/zones/{zone}/instances/{instance}/stop") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -56332,13 +55727,9 @@ func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateAccessConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -56526,13 +55917,9 @@ func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateNetworkInterface") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -56766,13 +56153,9 @@ func (c *InterconnectAttachmentsAggregatedListCall) doRequest(alt string) (*http } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/interconnectAttachments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -56964,13 +56347,9 @@ func (c *InterconnectAttachmentsDeleteCall) doRequest(alt string) (*http.Respons 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, "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -57134,13 +56513,9 @@ func (c *InterconnectAttachmentsGetCall) 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, "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -57311,13 +56686,9 @@ func (c *InterconnectAttachmentsInsertCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -57537,13 +56908,9 @@ func (c *InterconnectAttachmentsListCall) 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, "{project}/regions/{region}/interconnectAttachments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -57752,13 +57119,9 @@ func (c *InterconnectAttachmentsPatchCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -57925,13 +57288,9 @@ func (c *InterconnectLocationsGetCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnectLocations/{interconnectLocation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -58142,13 +57501,9 @@ func (c *InterconnectLocationsListCall) 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, "{project}/global/interconnectLocations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -58337,13 +57692,9 @@ func (c *InterconnectsDeleteCall) doRequest(alt string) (*http.Response, error) 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, "{project}/global/interconnects/{interconnect}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -58497,13 +57848,9 @@ func (c *InterconnectsGetCall) 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, "{project}/global/interconnects/{interconnect}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -58663,13 +58010,9 @@ func (c *InterconnectsInsertCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -58878,13 +58221,9 @@ func (c *InterconnectsListCall) 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, "{project}/global/interconnects") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -59082,13 +58421,9 @@ func (c *InterconnectsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{interconnect}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -59245,13 +58580,9 @@ func (c *LicenseCodesGetCall) 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, "{project}/global/licenseCodes/{licenseCode}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -59394,13 +58725,9 @@ func (c *LicenseCodesTestIamPermissionsCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenseCodes/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -59557,13 +58884,9 @@ func (c *LicensesDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/licenses/{license}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -59717,13 +59040,9 @@ func (c *LicensesGetCall) 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, "{project}/global/licenses/{license}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -59882,13 +59201,9 @@ func (c *LicensesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -60104,13 +59419,9 @@ func (c *LicensesListCall) 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, "{project}/global/licenses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -60288,13 +59599,9 @@ func (c *LicensesTestIamPermissionsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -60508,13 +59815,9 @@ func (c *MachineTypesAggregatedListCall) 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, "{project}/aggregated/machineTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -60702,13 +60005,9 @@ func (c *MachineTypesGetCall) 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, "{project}/zones/{zone}/machineTypes/{machineType}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -60931,13 +60230,9 @@ func (c *MachineTypesListCall) 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, "{project}/zones/{zone}/machineTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -61142,13 +60437,9 @@ func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/addPeering") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -61310,13 +60601,9 @@ func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/networks/{network}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -61471,13 +60758,9 @@ func (c *NetworksGetCall) 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, "{project}/global/networks/{network}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -61638,13 +60921,9 @@ func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -61854,13 +61133,9 @@ func (c *NetworksListCall) 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, "{project}/global/networks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -62058,13 +61333,9 @@ func (c *NetworksPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -62232,13 +61503,9 @@ func (c *NetworksRemovePeeringCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/removePeering") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -62400,13 +61667,9 @@ func (c *NetworksSwitchToCustomModeCall) doRequest(alt string) (*http.Response, 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, "{project}/global/networks/{network}/switchToCustomMode") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -62573,13 +61836,9 @@ func (c *NodeGroupsAddNodesCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/nodeGroups/{nodeGroup}/addNodes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -62806,13 +62065,9 @@ func (c *NodeGroupsAggregatedListCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/nodeGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -63003,13 +62258,9 @@ func (c *NodeGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/zones/{zone}/nodeGroups/{nodeGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -63185,13 +62436,9 @@ func (c *NodeGroupsDeleteNodesCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/nodeGroups/{nodeGroup}/deleteNodes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -63360,13 +62607,9 @@ func (c *NodeGroupsGetCall) 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, "{project}/zones/{zone}/nodeGroups/{nodeGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -63538,13 +62781,9 @@ func (c *NodeGroupsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/nodeGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -63773,13 +63012,9 @@ func (c *NodeGroupsListCall) 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, "{project}/zones/{zone}/nodeGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -64023,13 +63258,9 @@ func (c *NodeGroupsListNodesCall) doRequest(alt string) (*http.Response, error) 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, "{project}/zones/{zone}/nodeGroups/{nodeGroup}/listNodes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -64245,13 +63476,9 @@ func (c *NodeGroupsSetNodeTemplateCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/nodeGroups/{nodeGroup}/setNodeTemplate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -64477,13 +63704,9 @@ func (c *NodeTemplatesAggregatedListCall) 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, "{project}/aggregated/nodeTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -64674,13 +63897,9 @@ func (c *NodeTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) 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, "{project}/regions/{region}/nodeTemplates/{nodeTemplate}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -64845,13 +64064,9 @@ func (c *NodeTemplatesGetCall) 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, "{project}/regions/{region}/nodeTemplates/{nodeTemplate}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -65022,13 +64237,9 @@ func (c *NodeTemplatesInsertCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/nodeTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -65248,13 +64459,9 @@ func (c *NodeTemplatesListCall) 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, "{project}/regions/{region}/nodeTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -65508,13 +64715,9 @@ func (c *NodeTypesAggregatedListCall) 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, "{project}/aggregated/nodeTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -65701,13 +64904,9 @@ func (c *NodeTypesGetCall) 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, "{project}/zones/{zone}/nodeTypes/{nodeType}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -65929,13 +65128,9 @@ func (c *NodeTypesListCall) 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, "{project}/zones/{zone}/nodeTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -66131,13 +65326,9 @@ func (c *ProjectsDisableXpnHostCall) doRequest(alt string) (*http.Response, erro 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, "{project}/disableXpnHost") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -66292,13 +65483,9 @@ func (c *ProjectsDisableXpnResourceCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/disableXpnResource") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -66448,13 +65635,9 @@ func (c *ProjectsEnableXpnHostCall) doRequest(alt string) (*http.Response, error 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, "{project}/enableXpnHost") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -66610,13 +65793,9 @@ func (c *ProjectsEnableXpnResourceCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/enableXpnResource") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -66762,13 +65941,9 @@ func (c *ProjectsGetCall) 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, "{project}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -66907,13 +66082,9 @@ func (c *ProjectsGetXpnHostCall) 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, "{project}/getXpnHost") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -67114,13 +66285,9 @@ func (c *ProjectsGetXpnResourcesCall) 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, "{project}/getXpnResources") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -67358,13 +66525,9 @@ func (c *ProjectsListXpnHostsCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/listXpnHosts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -67560,13 +66723,9 @@ func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/moveDisk") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -67724,13 +66883,9 @@ func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/moveInstance") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -67889,13 +67044,9 @@ func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setCommonInstanceMetadata") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -68055,13 +67206,9 @@ func (c *ProjectsSetDefaultNetworkTierCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setDefaultNetworkTier") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -68222,13 +67369,9 @@ func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setUsageExportBucket") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -68385,13 +67528,9 @@ func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, err 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, "{project}/regions/{region}/autoscalers/{autoscaler}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -68555,13 +67694,9 @@ func (c *RegionAutoscalersGetCall) 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, "{project}/regions/{region}/autoscalers/{autoscaler}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -68732,13 +67867,9 @@ func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -68958,13 +68089,9 @@ func (c *RegionAutoscalersListCall) 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, "{project}/regions/{region}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -69178,13 +68305,9 @@ func (c *RegionAutoscalersPatchCall) 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, "{project}/regions/{region}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -69366,13 +68489,9 @@ func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -69541,13 +68660,9 @@ func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, 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, "{project}/regions/{region}/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -69711,13 +68826,9 @@ func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -69871,13 +68982,9 @@ func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}/getHealth") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -70053,13 +69160,9 @@ func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -70279,13 +69382,9 @@ func (c *RegionBackendServicesListCall) 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, "{project}/regions/{region}/backendServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -70497,13 +69596,9 @@ func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -70685,13 +69780,9 @@ func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -70917,13 +70008,9 @@ func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Respo } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/commitments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -71110,13 +70197,9 @@ func (c *RegionCommitmentsGetCall) 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, "{project}/regions/{region}/commitments/{commitment}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -71287,13 +70370,9 @@ func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -71513,13 +70592,9 @@ func (c *RegionCommitmentsListCall) 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, "{project}/regions/{region}/commitments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -71715,13 +70790,9 @@ func (c *RegionDiskTypesGetCall) 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, "{project}/regions/{region}/diskTypes/{diskType}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -71943,13 +71014,9 @@ func (c *RegionDiskTypesListCall) 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, "{project}/regions/{region}/diskTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -72156,13 +71223,9 @@ func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{disk}/createSnapshot") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -72337,13 +71400,9 @@ func (c *RegionDisksDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/regions/{region}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -72506,13 +71565,9 @@ func (c *RegionDisksGetCall) 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, "{project}/regions/{region}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -72690,13 +71745,9 @@ func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -72921,13 +71972,9 @@ func (c *RegionDisksListCall) 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, "{project}/regions/{region}/disks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -73134,13 +72181,9 @@ func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{disk}/resize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -73319,13 +72362,9 @@ func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -73486,13 +72525,9 @@ func (c *RegionDisksTestIamPermissionsCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -73683,13 +72718,9 @@ func (c *RegionInstanceGroupManagersAbandonInstancesCall) doRequest(alt string) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -73860,13 +72891,9 @@ func (c *RegionInstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Res 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, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -74055,13 +73082,9 @@ func (c *RegionInstanceGroupManagersDeleteInstancesCall) doRequest(alt string) ( } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -74227,13 +73250,9 @@ func (c *RegionInstanceGroupManagersGetCall) 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, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -74409,13 +73428,9 @@ func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -74634,13 +73649,9 @@ func (c *RegionInstanceGroupManagersListCall) doRequest(alt string) (*http.Respo } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -74886,13 +73897,9 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt stri 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, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -75101,13 +74108,9 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -75289,13 +74292,9 @@ func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Res 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, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -75480,13 +74479,9 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt strin } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -75665,13 +74660,9 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (* } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -75836,13 +74827,9 @@ func (c *RegionInstanceGroupsGetCall) 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, "{project}/regions/{region}/instanceGroups/{instanceGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -76062,13 +75049,9 @@ func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -76321,13 +75304,9 @@ func (c *RegionInstanceGroupsListInstancesCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -76546,13 +75525,9 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -76704,13 +75679,9 @@ func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, erro 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, "{project}/regions/{region}/operations/{operation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -76842,13 +75813,9 @@ func (c *RegionOperationsGetCall) 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, "{project}/regions/{region}/operations/{operation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -77071,13 +76038,9 @@ func (c *RegionOperationsListCall) 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, "{project}/regions/{region}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -77272,13 +76235,9 @@ func (c *RegionsGetCall) 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, "{project}/regions/{region}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -77490,13 +76449,9 @@ func (c *RegionsListCall) 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, "{project}/regions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -77741,13 +76696,9 @@ func (c *RoutersAggregatedListCall) 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, "{project}/aggregated/routers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -77938,13 +76889,9 @@ func (c *RoutersDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/regions/{region}/routers/{router}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -78109,13 +77056,9 @@ func (c *RoutersGetCall) 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, "{project}/regions/{region}/routers/{router}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -78276,13 +77219,9 @@ func (c *RoutersGetRouterStatusCall) doRequest(alt string) (*http.Response, erro } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}/getRouterStatus") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -78453,13 +77392,9 @@ func (c *RoutersInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -78679,13 +77614,9 @@ func (c *RoutersListCall) 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, "{project}/regions/{region}/routers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -78894,13 +77825,9 @@ func (c *RoutersPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -79062,13 +77989,9 @@ func (c *RoutersPreviewCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}/preview") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -79244,13 +78167,9 @@ func (c *RoutersUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -79421,13 +78340,9 @@ func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/routes/{route}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -79582,13 +78497,9 @@ func (c *RoutesGetCall) 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, "{project}/global/routes/{route}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -79749,13 +78660,9 @@ func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -79965,13 +78872,9 @@ func (c *RoutesListCall) 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, "{project}/global/routes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -80148,13 +79051,9 @@ func (c *SecurityPoliciesAddRuleCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}/addRule") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -80310,13 +79209,9 @@ func (c *SecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, erro 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, "{project}/global/securityPolicies/{securityPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -80470,13 +79365,9 @@ func (c *SecurityPoliciesGetCall) 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, "{project}/global/securityPolicies/{securityPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -80632,13 +79523,9 @@ func (c *SecurityPoliciesGetRuleCall) 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, "{project}/global/securityPolicies/{securityPolicy}/getRule") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -80804,13 +79691,9 @@ func (c *SecurityPoliciesInsertCall) 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, "{project}/global/securityPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -81019,13 +79902,9 @@ func (c *SecurityPoliciesListCall) 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, "{project}/global/securityPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -81222,13 +80101,9 @@ func (c *SecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -81384,13 +80259,9 @@ func (c *SecurityPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}/patchRule") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -81540,13 +80411,9 @@ func (c *SecurityPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, 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, "{project}/global/securityPolicies/{securityPolicy}/removeRule") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -81712,13 +80579,9 @@ func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/snapshots/{snapshot}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -81873,13 +80736,9 @@ func (c *SnapshotsGetCall) 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, "{project}/global/snapshots/{snapshot}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -82091,13 +80950,9 @@ func (c *SnapshotsListCall) 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, "{project}/global/snapshots") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -82275,13 +81130,9 @@ func (c *SnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -82437,13 +81288,9 @@ func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error 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, "{project}/global/sslCertificates/{sslCertificate}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -82597,13 +81444,9 @@ func (c *SslCertificatesGetCall) 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, "{project}/global/sslCertificates/{sslCertificate}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -82763,13 +81606,9 @@ func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -82978,13 +81817,9 @@ func (c *SslCertificatesListCall) 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, "{project}/global/sslCertificates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -83175,13 +82010,9 @@ func (c *SslPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/sslPolicies/{sslPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -83334,13 +82165,9 @@ func (c *SslPoliciesGetCall) 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, "{project}/global/sslPolicies/{sslPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -83499,13 +82326,9 @@ func (c *SslPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -83714,13 +82537,9 @@ func (c *SslPoliciesListCall) 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, "{project}/global/sslPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -83966,13 +82785,9 @@ func (c *SslPoliciesListAvailableFeaturesCall) doRequest(alt string) (*http.Resp } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslPolicies/listAvailableFeatures") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -84150,13 +82965,9 @@ func (c *SslPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslPolicies/{sslPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -84372,13 +83183,9 @@ func (c *SubnetworksAggregatedListCall) 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, "{project}/aggregated/subnetworks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -84569,13 +83376,9 @@ func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/regions/{region}/subnetworks/{subnetwork}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -84752,13 +83555,9 @@ func (c *SubnetworksExpandIpCidrRangeCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -84926,13 +83725,9 @@ func (c *SubnetworksGetCall) 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, "{project}/regions/{region}/subnetworks/{subnetwork}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -85103,13 +83898,9 @@ func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -85329,13 +84120,9 @@ func (c *SubnetworksListCall) 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, "{project}/regions/{region}/subnetworks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -85589,13 +84376,9 @@ func (c *SubnetworksListUsableCall) 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, "{project}/aggregated/subnetworks/listUsable") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -85798,13 +84581,9 @@ func (c *SubnetworksPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -85985,13 +84764,9 @@ func (c *SubnetworksSetPrivateIpGoogleAccessCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -86162,13 +84937,9 @@ func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, err 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, "{project}/global/targetHttpProxies/{targetHttpProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -86323,13 +85094,9 @@ func (c *TargetHttpProxiesGetCall) 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, "{project}/global/targetHttpProxies/{targetHttpProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -86490,13 +85257,9 @@ func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -86706,13 +85469,9 @@ func (c *TargetHttpProxiesListCall) 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, "{project}/global/targetHttpProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -86909,13 +85668,9 @@ func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -87076,13 +85831,9 @@ func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, er 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, "{project}/global/targetHttpsProxies/{targetHttpsProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -87236,13 +85987,9 @@ func (c *TargetHttpsProxiesGetCall) 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, "{project}/global/targetHttpsProxies/{targetHttpsProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -87402,13 +86149,9 @@ func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -87617,13 +86360,9 @@ func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, erro } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -87819,13 +86558,9 @@ func (c *TargetHttpsProxiesSetQuicOverrideCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -87992,13 +86727,9 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http. } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -88170,13 +86901,9 @@ func (c *TargetHttpsProxiesSetSslPolicyCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}/setSslPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -88343,13 +87070,9 @@ func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -88567,13 +87290,9 @@ func (c *TargetInstancesAggregatedListCall) 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, "{project}/aggregated/targetInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -88765,13 +87484,9 @@ func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error 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, "{project}/zones/{zone}/targetInstances/{targetInstance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -88937,13 +87652,9 @@ func (c *TargetInstancesGetCall) 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, "{project}/zones/{zone}/targetInstances/{targetInstance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -89115,13 +87826,9 @@ func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -89342,13 +88049,9 @@ func (c *TargetInstancesListCall) 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, "{project}/zones/{zone}/targetInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -89556,13 +88259,9 @@ func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -89742,13 +88441,9 @@ func (c *TargetPoolsAddInstanceCall) 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, "{project}/regions/{region}/targetPools/{targetPool}/addInstance") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -89975,13 +88670,9 @@ func (c *TargetPoolsAggregatedListCall) 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, "{project}/aggregated/targetPools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -90173,13 +88864,9 @@ func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/regions/{region}/targetPools/{targetPool}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -90345,13 +89032,9 @@ func (c *TargetPoolsGetCall) 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, "{project}/regions/{region}/targetPools/{targetPool}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -90506,13 +89189,9 @@ func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/getHealth") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -90687,13 +89366,9 @@ func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -90914,13 +89589,9 @@ func (c *TargetPoolsListCall) 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, "{project}/regions/{region}/targetPools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -91128,13 +89799,9 @@ func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -91314,13 +89981,9 @@ func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeInstance") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -91507,13 +90170,9 @@ func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/setBackup") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -91689,13 +90348,9 @@ func (c *TargetSslProxiesDeleteCall) doRequest(alt string) (*http.Response, erro 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, "{project}/global/targetSslProxies/{targetSslProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -91849,13 +90504,9 @@ func (c *TargetSslProxiesGetCall) 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, "{project}/global/targetSslProxies/{targetSslProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -92015,13 +90666,9 @@ func (c *TargetSslProxiesInsertCall) 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, "{project}/global/targetSslProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -92230,13 +90877,9 @@ func (c *TargetSslProxiesListCall) 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, "{project}/global/targetSslProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -92432,13 +91075,9 @@ func (c *TargetSslProxiesSetBackendServiceCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -92606,13 +91245,9 @@ func (c *TargetSslProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -92780,13 +91415,9 @@ func (c *TargetSslProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Re } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -92957,13 +91588,9 @@ func (c *TargetSslProxiesSetSslPolicyCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setSslPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -93123,13 +91750,9 @@ func (c *TargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, erro 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, "{project}/global/targetTcpProxies/{targetTcpProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -93283,13 +91906,9 @@ func (c *TargetTcpProxiesGetCall) 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, "{project}/global/targetTcpProxies/{targetTcpProxy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -93449,13 +92068,9 @@ func (c *TargetTcpProxiesInsertCall) 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, "{project}/global/targetTcpProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -93664,13 +92279,9 @@ func (c *TargetTcpProxiesListCall) 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, "{project}/global/targetTcpProxies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -93866,13 +92477,9 @@ func (c *TargetTcpProxiesSetBackendServiceCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -94040,13 +92647,9 @@ func (c *TargetTcpProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -94263,13 +92866,9 @@ func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Respo } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetVpnGateways") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -94460,13 +93059,9 @@ func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, err 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, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -94631,13 +93226,9 @@ func (c *TargetVpnGatewaysGetCall) 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, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -94808,13 +93399,9 @@ func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -95034,13 +93621,9 @@ func (c *TargetVpnGatewaysListCall) 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, "{project}/regions/{region}/targetVpnGateways") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -95239,13 +93822,9 @@ func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/global/urlMaps/{urlMap}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -95400,13 +93979,9 @@ func (c *UrlMapsGetCall) 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, "{project}/global/urlMaps/{urlMap}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -95567,13 +94142,9 @@ func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -95733,13 +94304,9 @@ func (c *UrlMapsInvalidateCacheCall) 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, "{project}/global/urlMaps/{urlMap}/invalidateCache") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -95958,13 +94525,9 @@ func (c *UrlMapsListCall) 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, "{project}/global/urlMaps") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -96163,13 +94726,9 @@ func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -96339,13 +94898,9 @@ func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -96497,13 +95052,9 @@ func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/validate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -96715,13 +95266,9 @@ func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/vpnTunnels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -96912,13 +95459,9 @@ func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -97083,13 +95626,9 @@ func (c *VpnTunnelsGetCall) 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, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -97260,13 +95799,9 @@ func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -97486,13 +96021,9 @@ func (c *VpnTunnelsListCall) 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, "{project}/regions/{region}/vpnTunnels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -97674,13 +96205,9 @@ func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) 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, "{project}/zones/{zone}/operations/{operation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -97812,13 +96339,9 @@ func (c *ZoneOperationsGetCall) 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, "{project}/zones/{zone}/operations/{operation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -98041,13 +96564,9 @@ func (c *ZoneOperationsListCall) 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, "{project}/zones/{zone}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -98242,13 +96761,9 @@ func (c *ZonesGetCall) 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, "{project}/zones/{zone}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -98460,13 +96975,9 @@ func (c *ZonesListCall) 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, "{project}/zones") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, diff --git a/vendor/google.golang.org/api/container/v1/container-api.json b/vendor/google.golang.org/api/container/v1/container-api.json index 7e0adba9..471ddc43 100644 --- a/vendor/google.golang.org/api/container/v1/container-api.json +++ b/vendor/google.golang.org/api/container/v1/container-api.json @@ -2361,7 +2361,7 @@ } } }, - "revision": "20180917", + "revision": "20180813", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2603,10 +2603,6 @@ }, "type": "array" }, - "privateClusterConfig": { - "$ref": "PrivateClusterConfig", - "description": "Configuration for private cluster." - }, "resourceLabels": { "additionalProperties": { "type": "string" @@ -3114,7 +3110,7 @@ "additionalProperties": { "type": "string" }, - "description": "The metadata key/value pairs assigned to instances in the cluster.\n\nKeys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes\nin length. These are reflected as part of a URL in the metadata server.\nAdditionally, to avoid ambiguity, keys must not conflict with any other\nmetadata keys for the project or be one of the reserved keys:\n \"cluster-location\"\n \"cluster-name\"\n \"cluster-uid\"\n \"configure-sh\"\n \"enable-os-login\"\n \"gci-update-strategy\"\n \"gci-ensure-gke-docker\"\n \"instance-template\"\n \"kube-env\"\n \"startup-script\"\n \"user-data\"\n\nValues are free-form strings, and only have meaning as interpreted by\nthe image running in the instance. The only restriction placed on them is\nthat each value's size must be less than or equal to 32 KB.\n\nThe total size of all keys and values must be less than 512 KB.", + "description": "The metadata key/value pairs assigned to instances in the cluster.\n\nKeys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes\nin length. These are reflected as part of a URL in the metadata server.\nAdditionally, to avoid ambiguity, keys must not conflict with any other\nmetadata keys for the project or be one of the reserved keys:\n \"cluster-location\"\n \"cluster-name\"\n \"cluster-uid\"\n \"configure-sh\"\n \"gci-update-strategy\"\n \"gci-ensure-gke-docker\"\n \"instance-template\"\n \"kube-env\"\n \"startup-script\"\n \"user-data\"\n\nValues are free-form strings, and only have meaning as interpreted by\nthe image running in the instance. The only restriction placed on them is\nthat each value's size must be less than or equal to 32 KB.\n\nThe total size of all keys and values must be less than 512 KB.", "type": "object" }, "minCpuPlatform": { @@ -3358,33 +3354,6 @@ }, "type": "object" }, - "PrivateClusterConfig": { - "description": "Configuration options for private clusters.", - "id": "PrivateClusterConfig", - "properties": { - "enablePrivateEndpoint": { - "description": "Whether the master's internal IP address is used as the cluster endpoint.", - "type": "boolean" - }, - "enablePrivateNodes": { - "description": "Whether nodes have internal IP addresses only. If enabled, all nodes are\ngiven only RFC 1918 private addresses and communicate with the master via\nprivate networking.", - "type": "boolean" - }, - "masterIpv4CidrBlock": { - "description": "The IP range in CIDR notation to use for the hosted master network. This\nrange will be used for assigning internal IP addresses to the master or\nset of masters, as well as the ILB VIP. This range must not overlap with\nany other ranges in use within the cluster's network.", - "type": "string" - }, - "privateEndpoint": { - "description": "Output only. The internal IP address of this cluster's master endpoint.", - "type": "string" - }, - "publicEndpoint": { - "description": "Output only. The external IP address of this cluster's master endpoint.", - "type": "string" - } - }, - "type": "object" - }, "RollbackNodePoolUpgradeRequest": { "description": "RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed\nNodePool upgrade. This will be an no-op if the last upgrade successfully\ncompleted.", "id": "RollbackNodePoolUpgradeRequest", diff --git a/vendor/google.golang.org/api/container/v1/container-gen.go b/vendor/google.golang.org/api/container/v1/container-gen.go index 07bf9933..020c6487 100644 --- a/vendor/google.golang.org/api/container/v1/container-gen.go +++ b/vendor/google.golang.org/api/container/v1/container-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -643,9 +642,6 @@ type Cluster struct { // specified. NodePools []*NodePool `json:"nodePools,omitempty"` - // PrivateClusterConfig: Configuration for private cluster. - PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` - // ResourceLabels: The resource labels for the cluster to use to // annotate any related // Google Compute Engine resources. @@ -1810,7 +1806,6 @@ type NodeConfig struct { // "cluster-name" // "cluster-uid" // "configure-sh" - // "enable-os-login" // "gci-update-strategy" // "gci-ensure-gke-docker" // "instance-template" @@ -2208,61 +2203,6 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PrivateClusterConfig: Configuration options for private clusters. -type PrivateClusterConfig struct { - // EnablePrivateEndpoint: Whether the master's internal IP address is - // used as the cluster endpoint. - EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty"` - - // EnablePrivateNodes: Whether nodes have internal IP addresses only. If - // enabled, all nodes are - // given only RFC 1918 private addresses and communicate with the master - // via - // private networking. - EnablePrivateNodes bool `json:"enablePrivateNodes,omitempty"` - - // MasterIpv4CidrBlock: The IP range in CIDR notation to use for the - // hosted master network. This - // range will be used for assigning internal IP addresses to the master - // or - // set of masters, as well as the ILB VIP. This range must not overlap - // with - // any other ranges in use within the cluster's network. - MasterIpv4CidrBlock string `json:"masterIpv4CidrBlock,omitempty"` - - // PrivateEndpoint: Output only. The internal IP address of this - // cluster's master endpoint. - PrivateEndpoint string `json:"privateEndpoint,omitempty"` - - // PublicEndpoint: Output only. The external IP address of this - // cluster's master endpoint. - PublicEndpoint string `json:"publicEndpoint,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EnablePrivateEndpoint") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EnablePrivateEndpoint") 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 *PrivateClusterConfig) MarshalJSON() ([]byte, error) { - type NoMethod PrivateClusterConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // RollbackNodePoolUpgradeRequest: RollbackNodePoolUpgradeRequest // rollbacks the previously Aborted or Failed // NodePool upgrade. This will be an no-op if the last upgrade @@ -3409,13 +3349,9 @@ func (c *ProjectsLocationsGetServerConfigCall) doRequest(alt string) (*http.Resp } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/serverConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3555,13 +3491,9 @@ func (c *ProjectsLocationsClustersCompleteIpRotationCall) doRequest(alt string) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:completeIpRotation") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3710,13 +3642,9 @@ func (c *ProjectsLocationsClustersCreateCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/clusters") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -3883,13 +3811,9 @@ func (c *ProjectsLocationsClustersDeleteCall) doRequest(alt string) (*http.Respo reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4071,13 +3995,9 @@ func (c *ProjectsLocationsClustersGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4252,13 +4172,9 @@ func (c *ProjectsLocationsClustersListCall) 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, "v1/{+parent}/clusters") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -4398,13 +4314,9 @@ func (c *ProjectsLocationsClustersSetAddonsCall) doRequest(alt string) (*http.Re } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setAddons") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4538,13 +4450,9 @@ func (c *ProjectsLocationsClustersSetLegacyAbacCall) doRequest(alt string) (*htt } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setLegacyAbac") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4677,13 +4585,9 @@ func (c *ProjectsLocationsClustersSetLocationsCall) doRequest(alt string) (*http } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setLocations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4816,13 +4720,9 @@ func (c *ProjectsLocationsClustersSetLoggingCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setLogging") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4955,13 +4855,9 @@ func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) doRequest(alt string } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setMaintenancePolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5098,13 +4994,9 @@ func (c *ProjectsLocationsClustersSetMasterAuthCall) doRequest(alt string) (*htt } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setMasterAuth") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5237,13 +5129,9 @@ func (c *ProjectsLocationsClustersSetMonitoringCall) doRequest(alt string) (*htt } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setMonitoring") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5376,13 +5264,9 @@ func (c *ProjectsLocationsClustersSetNetworkPolicyCall) doRequest(alt string) (* } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setNetworkPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5515,13 +5399,9 @@ func (c *ProjectsLocationsClustersSetResourceLabelsCall) doRequest(alt string) ( } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setResourceLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5654,13 +5534,9 @@ func (c *ProjectsLocationsClustersStartIpRotationCall) doRequest(alt string) (*h } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:startIpRotation") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5793,13 +5669,9 @@ func (c *ProjectsLocationsClustersUpdateCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5932,13 +5804,9 @@ func (c *ProjectsLocationsClustersUpdateMasterCall) doRequest(alt string) (*http } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:updateMaster") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -6071,13 +5939,9 @@ func (c *ProjectsLocationsClustersNodePoolsCreateCall) doRequest(alt string) (*h } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nodePools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -6241,13 +6105,9 @@ func (c *ProjectsLocationsClustersNodePoolsDeleteCall) doRequest(alt string) (*h reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -6442,13 +6302,9 @@ func (c *ProjectsLocationsClustersNodePoolsGetCall) doRequest(alt string) (*http } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -6635,13 +6491,9 @@ func (c *ProjectsLocationsClustersNodePoolsListCall) doRequest(alt string) (*htt } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nodePools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -6788,13 +6640,9 @@ func (c *ProjectsLocationsClustersNodePoolsRollbackCall) doRequest(alt string) ( } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rollback") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -6928,13 +6776,9 @@ func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) doRequest(alt str } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setAutoscaling") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -7067,13 +6911,9 @@ func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) doRequest(alt stri } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setManagement") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -7206,13 +7046,9 @@ func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) doRequest(alt string) (* } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setSize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -7346,13 +7182,9 @@ func (c *ProjectsLocationsClustersNodePoolsUpdateCall) doRequest(alt string) (*h } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -7485,13 +7317,9 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -7661,13 +7489,9 @@ func (c *ProjectsLocationsOperationsGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -7842,13 +7666,9 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -8006,13 +7826,9 @@ func (c *ProjectsZonesGetServerconfigCall) 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, "v1/projects/{projectId}/zones/{zone}/serverconfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -8158,13 +7974,9 @@ func (c *ProjectsZonesClustersAddonsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -8316,13 +8128,9 @@ func (c *ProjectsZonesClustersCompleteIpRotationCall) doRequest(alt string) (*ht } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -8488,13 +8296,9 @@ func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -8650,13 +8454,9 @@ func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -8825,13 +8625,9 @@ func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -8986,13 +8782,9 @@ func (c *ProjectsZonesClustersLegacyAbacCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9160,13 +8952,9 @@ func (c *ProjectsZonesClustersListCall) 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, "v1/projects/{projectId}/zones/{zone}/clusters") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9312,13 +9100,9 @@ func (c *ProjectsZonesClustersLocationsCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9470,13 +9254,9 @@ func (c *ProjectsZonesClustersLoggingCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9628,13 +9408,9 @@ func (c *ProjectsZonesClustersMasterCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9786,13 +9562,9 @@ func (c *ProjectsZonesClustersMonitoringCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9944,13 +9716,9 @@ func (c *ProjectsZonesClustersResourceLabelsCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10102,13 +9870,9 @@ func (c *ProjectsZonesClustersSetMaintenancePolicyCall) doRequest(alt string) (* } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10264,13 +10028,9 @@ func (c *ProjectsZonesClustersSetMasterAuthCall) doRequest(alt string) (*http.Re } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10422,13 +10182,9 @@ func (c *ProjectsZonesClustersSetNetworkPolicyCall) doRequest(alt string) (*http } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10580,13 +10336,9 @@ func (c *ProjectsZonesClustersStartIpRotationCall) doRequest(alt string) (*http. } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10738,13 +10490,9 @@ func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10898,13 +10646,9 @@ func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) doRequest(alt string) (* } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11064,13 +10808,9 @@ func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http. } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11227,13 +10967,9 @@ func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http. reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11414,13 +11150,9 @@ func (c *ProjectsZonesClustersNodePoolsGetCall) 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, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11597,13 +11329,9 @@ func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Re } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11761,13 +11489,9 @@ func (c *ProjectsZonesClustersNodePoolsRollbackCall) doRequest(alt string) (*htt } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11929,13 +11653,9 @@ func (c *ProjectsZonesClustersNodePoolsSetManagementCall) doRequest(alt string) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -12097,13 +11817,9 @@ func (c *ProjectsZonesClustersNodePoolsSetSizeCall) doRequest(alt string) (*http } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -12266,13 +11982,9 @@ func (c *ProjectsZonesClustersNodePoolsUpdateCall) doRequest(alt string) (*http. } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -12432,13 +12144,9 @@ func (c *ProjectsZonesOperationsCancelCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -12605,13 +12313,9 @@ func (c *ProjectsZonesOperationsGetCall) 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, "v1/projects/{projectId}/zones/{zone}/operations/{operationId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -12780,13 +12484,9 @@ func (c *ProjectsZonesOperationsListCall) 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, "v1/projects/{projectId}/zones/{zone}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, diff --git a/vendor/google.golang.org/api/container/v1beta1/container-api.json b/vendor/google.golang.org/api/container/v1beta1/container-api.json index 0beb6676..7fc5e8fe 100644 --- a/vendor/google.golang.org/api/container/v1beta1/container-api.json +++ b/vendor/google.golang.org/api/container/v1beta1/container-api.json @@ -2435,7 +2435,7 @@ } } }, - "revision": "20180917", + "revision": "20180824", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2720,7 +2720,7 @@ "description": "Configuration for the PodSecurityPolicy feature." }, "privateCluster": { - "description": "If this is a private cluster setup. Private clusters are clusters that, by\ndefault have no external IP addresses on the nodes and where nodes and the\nmaster communicate over private IP addresses.\nThis field is deprecated, use private_cluster_config.enable_private_nodes\ninstead.", + "description": "If this is a private cluster setup. Private clusters are clusters that, by\ndefault have no external IP addresses on the nodes and where nodes and the\nmaster communicate over private IP addresses.\nThis field is deprecated, use private_cluster_config.enabled instead.", "type": "boolean" }, "privateClusterConfig": { @@ -3764,11 +3764,11 @@ "type": "boolean" }, "enablePrivateNodes": { - "description": "Whether nodes have internal IP addresses only. If enabled, all nodes are\ngiven only RFC 1918 private addresses and communicate with the master via\nprivate networking.", + "description": "Whether nodes have only private IP addresses, and communicate with the\nmaster via private networking.", "type": "boolean" }, "masterIpv4CidrBlock": { - "description": "The IP range in CIDR notation to use for the hosted master network. This\nrange will be used for assigning internal IP addresses to the master or\nset of masters, as well as the ILB VIP. This range must not overlap with\nany other ranges in use within the cluster's network.", + "description": "The IP prefix in CIDR notation to use for the hosted master network. This\nprefix will be used for assigning private IP addresses to the master or\nset of masters, as well as the ILB VIP.", "type": "string" }, "privateEndpoint": { @@ -4265,14 +4265,12 @@ "enum": [ "UNKNOWN", "GCE_STOCKOUT", - "GKE_SERVICE_ACCOUNT_DELETED", - "GCE_QUOTA_EXCEEDED" + "GKE_SERVICE_ACCOUNT_DELETED" ], "enumDescriptions": [ "UNKNOWN indicates a generic condition.", "GCE_STOCKOUT indicates a GCE stockout.", - "GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot\nservice account.", - "GCE quota was exceeded.\nMore codes TBA" + "GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot\nservice account.\nMore codes TBA" ], "type": "string" }, diff --git a/vendor/google.golang.org/api/container/v1beta1/container-gen.go b/vendor/google.golang.org/api/container/v1beta1/container-gen.go index ddaefd37..a4157206 100644 --- a/vendor/google.golang.org/api/container/v1beta1/container-gen.go +++ b/vendor/google.golang.org/api/container/v1beta1/container-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -735,9 +734,7 @@ type Cluster struct { // default have no external IP addresses on the nodes and where nodes // and the // master communicate over private IP addresses. - // This field is deprecated, use - // private_cluster_config.enable_private_nodes - // instead. + // This field is deprecated, use private_cluster_config.enabled instead. PrivateCluster bool `json:"privateCluster,omitempty"` // PrivateClusterConfig: Configuration for private cluster. @@ -2801,20 +2798,16 @@ type PrivateClusterConfig struct { // used as the cluster endpoint. EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty"` - // EnablePrivateNodes: Whether nodes have internal IP addresses only. If - // enabled, all nodes are - // given only RFC 1918 private addresses and communicate with the master - // via - // private networking. + // EnablePrivateNodes: Whether nodes have only private IP addresses, and + // communicate with the + // master via private networking. EnablePrivateNodes bool `json:"enablePrivateNodes,omitempty"` - // MasterIpv4CidrBlock: The IP range in CIDR notation to use for the + // MasterIpv4CidrBlock: The IP prefix in CIDR notation to use for the // hosted master network. This - // range will be used for assigning internal IP addresses to the master + // prefix will be used for assigning private IP addresses to the master // or - // set of masters, as well as the ILB VIP. This range must not overlap - // with - // any other ranges in use within the cluster's network. + // set of masters, as well as the ILB VIP. MasterIpv4CidrBlock string `json:"masterIpv4CidrBlock,omitempty"` // PrivateEndpoint: Output only. The internal IP address of this @@ -3767,7 +3760,6 @@ type StatusCondition struct { // "GKE_SERVICE_ACCOUNT_DELETED" - GKE_SERVICE_ACCOUNT_DELETED // indicates that the user deleted their robot // service account. - // "GCE_QUOTA_EXCEEDED" - GCE quota was exceeded. // More codes TBA Code string `json:"code,omitempty"` @@ -4246,10 +4238,7 @@ func (c *ProjectsAggregatedUsableSubnetworksListCall) doRequest(alt string) (*ht c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/aggregated/usableSubnetworks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -4447,10 +4436,7 @@ func (c *ProjectsLocationsGetServerConfigCall) doRequest(alt string) (*http.Resp c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/serverConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4600,10 +4586,7 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/locations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -4736,10 +4719,7 @@ func (c *ProjectsLocationsClustersCompleteIpRotationCall) doRequest(alt string) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:completeIpRotation") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4891,10 +4871,7 @@ func (c *ProjectsLocationsClustersCreateCall) doRequest(alt string) (*http.Respo c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/clusters") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -5064,10 +5041,7 @@ func (c *ProjectsLocationsClustersDeleteCall) doRequest(alt string) (*http.Respo c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5252,10 +5226,7 @@ func (c *ProjectsLocationsClustersGetCall) doRequest(alt string) (*http.Response c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5433,10 +5404,7 @@ func (c *ProjectsLocationsClustersListCall) doRequest(alt string) (*http.Respons c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/clusters") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -5579,10 +5547,7 @@ func (c *ProjectsLocationsClustersSetAddonsCall) doRequest(alt string) (*http.Re c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setAddons") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5719,10 +5684,7 @@ func (c *ProjectsLocationsClustersSetLegacyAbacCall) doRequest(alt string) (*htt c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLegacyAbac") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5858,10 +5820,7 @@ func (c *ProjectsLocationsClustersSetLocationsCall) doRequest(alt string) (*http c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLocations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5997,10 +5956,7 @@ func (c *ProjectsLocationsClustersSetLoggingCall) doRequest(alt string) (*http.R c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setLogging") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -6136,10 +6092,7 @@ func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) doRequest(alt string c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMaintenancePolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -6279,10 +6232,7 @@ func (c *ProjectsLocationsClustersSetMasterAuthCall) doRequest(alt string) (*htt c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMasterAuth") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -6418,10 +6368,7 @@ func (c *ProjectsLocationsClustersSetMonitoringCall) doRequest(alt string) (*htt c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setMonitoring") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -6557,10 +6504,7 @@ func (c *ProjectsLocationsClustersSetNetworkPolicyCall) doRequest(alt string) (* c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setNetworkPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -6696,10 +6640,7 @@ func (c *ProjectsLocationsClustersSetResourceLabelsCall) doRequest(alt string) ( c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setResourceLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -6835,10 +6776,7 @@ func (c *ProjectsLocationsClustersStartIpRotationCall) doRequest(alt string) (*h c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:startIpRotation") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -6974,10 +6912,7 @@ func (c *ProjectsLocationsClustersUpdateCall) doRequest(alt string) (*http.Respo c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -7113,10 +7048,7 @@ func (c *ProjectsLocationsClustersUpdateMasterCall) doRequest(alt string) (*http c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:updateMaster") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -7252,10 +7184,7 @@ func (c *ProjectsLocationsClustersNodePoolsCreateCall) doRequest(alt string) (*h c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/nodePools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -7422,10 +7351,7 @@ func (c *ProjectsLocationsClustersNodePoolsDeleteCall) doRequest(alt string) (*h c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -7623,10 +7549,7 @@ func (c *ProjectsLocationsClustersNodePoolsGetCall) doRequest(alt string) (*http c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -7816,10 +7739,7 @@ func (c *ProjectsLocationsClustersNodePoolsListCall) doRequest(alt string) (*htt c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/nodePools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -7969,10 +7889,7 @@ func (c *ProjectsLocationsClustersNodePoolsRollbackCall) doRequest(alt string) ( c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rollback") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -8109,10 +8026,7 @@ func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) doRequest(alt str c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setAutoscaling") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -8248,10 +8162,7 @@ func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) doRequest(alt stri c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setManagement") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -8387,10 +8298,7 @@ func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) doRequest(alt string) (* c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setSize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -8527,10 +8435,7 @@ func (c *ProjectsLocationsClustersNodePoolsUpdateCall) doRequest(alt string) (*h c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -8666,10 +8571,7 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -8842,10 +8744,7 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -9023,10 +8922,7 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -9187,10 +9083,7 @@ func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/serverconfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9339,10 +9232,7 @@ func (c *ProjectsZonesClustersAddonsCall) doRequest(alt string) (*http.Response, c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9497,10 +9387,7 @@ func (c *ProjectsZonesClustersCompleteIpRotationCall) doRequest(alt string) (*ht c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9669,10 +9556,7 @@ func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9831,10 +9715,7 @@ func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10006,10 +9887,7 @@ func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, er c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10167,10 +10045,7 @@ func (c *ProjectsZonesClustersLegacyAbacCall) doRequest(alt string) (*http.Respo c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10341,10 +10216,7 @@ func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, e c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10493,10 +10365,7 @@ func (c *ProjectsZonesClustersLocationsCall) doRequest(alt string) (*http.Respon c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10651,10 +10520,7 @@ func (c *ProjectsZonesClustersLoggingCall) doRequest(alt string) (*http.Response c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10809,10 +10675,7 @@ func (c *ProjectsZonesClustersMasterCall) doRequest(alt string) (*http.Response, c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10967,10 +10830,7 @@ func (c *ProjectsZonesClustersMonitoringCall) doRequest(alt string) (*http.Respo c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11125,10 +10985,7 @@ func (c *ProjectsZonesClustersResourceLabelsCall) doRequest(alt string) (*http.R c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11283,10 +11140,7 @@ func (c *ProjectsZonesClustersSetMaintenancePolicyCall) doRequest(alt string) (* c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11445,10 +11299,7 @@ func (c *ProjectsZonesClustersSetMasterAuthCall) doRequest(alt string) (*http.Re c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11603,10 +11454,7 @@ func (c *ProjectsZonesClustersSetNetworkPolicyCall) doRequest(alt string) (*http c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11761,10 +11609,7 @@ func (c *ProjectsZonesClustersStartIpRotationCall) doRequest(alt string) (*http. c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11919,10 +11764,7 @@ func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -12079,10 +11921,7 @@ func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) doRequest(alt string) (* c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -12245,10 +12084,7 @@ func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http. c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -12408,10 +12244,7 @@ func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http. c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -12595,10 +12428,7 @@ func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Res c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -12778,10 +12608,7 @@ func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Re c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -12942,10 +12769,7 @@ func (c *ProjectsZonesClustersNodePoolsRollbackCall) doRequest(alt string) (*htt c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -13110,10 +12934,7 @@ func (c *ProjectsZonesClustersNodePoolsSetManagementCall) doRequest(alt string) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -13278,10 +13099,7 @@ func (c *ProjectsZonesClustersNodePoolsSetSizeCall) doRequest(alt string) (*http c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -13447,10 +13265,7 @@ func (c *ProjectsZonesClustersNodePoolsUpdateCall) doRequest(alt string) (*http. c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -13613,10 +13428,7 @@ func (c *ProjectsZonesOperationsCancelCall) doRequest(alt string) (*http.Respons c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -13786,10 +13598,7 @@ func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -13961,10 +13770,7 @@ func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects/{projectId}/zones/{zone}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, diff --git a/vendor/google.golang.org/api/dataflow/v1b3/dataflow-api.json b/vendor/google.golang.org/api/dataflow/v1b3/dataflow-api.json index c1dc4916..9838b201 100644 --- a/vendor/google.golang.org/api/dataflow/v1b3/dataflow-api.json +++ b/vendor/google.golang.org/api/dataflow/v1b3/dataflow-api.json @@ -1543,7 +1543,7 @@ } } }, - "revision": "20181016", + "revision": "20180614", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { @@ -2381,8 +2381,7 @@ "JOB_STATE_DRAINING", "JOB_STATE_DRAINED", "JOB_STATE_PENDING", - "JOB_STATE_CANCELLING", - "JOB_STATE_QUEUED" + "JOB_STATE_CANCELLING" ], "enumDescriptions": [ "The job's run state isn't specified.", @@ -2394,9 +2393,8 @@ "`JOB_STATE_UPDATED` indicates that the job was successfully updated,\nmeaning that this job was stopped and another job was started, inheriting\nstate from this one. This is a terminal job state. This state may only be\nset by the Cloud Dataflow service, and only as a transition from\n`JOB_STATE_RUNNING`.", "`JOB_STATE_DRAINING` indicates that the job is in the process of draining.\nA draining job has stopped pulling from its input sources and is processing\nany data that remains in-flight. This state may be set via a Cloud Dataflow\n`UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. Jobs\nthat are draining may only transition to `JOB_STATE_DRAINED`,\n`JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`.", "`JOB_STATE_DRAINED` indicates that the job has been drained.\nA drained job terminated by stopping pulling from its input sources and\nprocessing any data that remained in-flight when draining was requested.\nThis state is a terminal state, may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_DRAINING`.", - "`JOB_STATE_PENDING` indicates that the job has been created but is not yet\nrunning. Jobs that are pending may only transition to `JOB_STATE_RUNNING`,\nor `JOB_STATE_FAILED`.", - "`JOB_STATE_CANCELLING` indicates that the job has been explicitly cancelled\nand is in the process of stopping. Jobs that are cancelling may only\ntransition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`.", - "`JOB_STATE_QUEUED` indicates that the job has been created but is being\ndelayed until launch. Jobs that are queued may only transition to\n`JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`." + "'JOB_STATE_PENDING' indicates that the job has been created but is not yet\nrunning. Jobs that are pending may only transition to `JOB_STATE_RUNNING`,\nor `JOB_STATE_FAILED`.", + "'JOB_STATE_CANCELLING' indicates that the job has been explicitly cancelled\nand is in the process of stopping. Jobs that are cancelling may only\ntransition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'." ], "type": "string" } @@ -2727,8 +2725,7 @@ "JOB_STATE_DRAINING", "JOB_STATE_DRAINED", "JOB_STATE_PENDING", - "JOB_STATE_CANCELLING", - "JOB_STATE_QUEUED" + "JOB_STATE_CANCELLING" ], "enumDescriptions": [ "The job's run state isn't specified.", @@ -2740,9 +2737,8 @@ "`JOB_STATE_UPDATED` indicates that the job was successfully updated,\nmeaning that this job was stopped and another job was started, inheriting\nstate from this one. This is a terminal job state. This state may only be\nset by the Cloud Dataflow service, and only as a transition from\n`JOB_STATE_RUNNING`.", "`JOB_STATE_DRAINING` indicates that the job is in the process of draining.\nA draining job has stopped pulling from its input sources and is processing\nany data that remains in-flight. This state may be set via a Cloud Dataflow\n`UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. Jobs\nthat are draining may only transition to `JOB_STATE_DRAINED`,\n`JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`.", "`JOB_STATE_DRAINED` indicates that the job has been drained.\nA drained job terminated by stopping pulling from its input sources and\nprocessing any data that remained in-flight when draining was requested.\nThis state is a terminal state, may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_DRAINING`.", - "`JOB_STATE_PENDING` indicates that the job has been created but is not yet\nrunning. Jobs that are pending may only transition to `JOB_STATE_RUNNING`,\nor `JOB_STATE_FAILED`.", - "`JOB_STATE_CANCELLING` indicates that the job has been explicitly cancelled\nand is in the process of stopping. Jobs that are cancelling may only\ntransition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`.", - "`JOB_STATE_QUEUED` indicates that the job has been created but is being\ndelayed until launch. Jobs that are queued may only transition to\n`JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`." + "'JOB_STATE_PENDING' indicates that the job has been created but is not yet\nrunning. Jobs that are pending may only transition to `JOB_STATE_RUNNING`,\nor `JOB_STATE_FAILED`.", + "'JOB_STATE_CANCELLING' indicates that the job has been explicitly cancelled\nand is in the process of stopping. Jobs that are cancelling may only\ntransition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'." ], "type": "string" }, @@ -2811,8 +2807,7 @@ "JOB_STATE_DRAINING", "JOB_STATE_DRAINED", "JOB_STATE_PENDING", - "JOB_STATE_CANCELLING", - "JOB_STATE_QUEUED" + "JOB_STATE_CANCELLING" ], "enumDescriptions": [ "The job's run state isn't specified.", @@ -2824,9 +2819,8 @@ "`JOB_STATE_UPDATED` indicates that the job was successfully updated,\nmeaning that this job was stopped and another job was started, inheriting\nstate from this one. This is a terminal job state. This state may only be\nset by the Cloud Dataflow service, and only as a transition from\n`JOB_STATE_RUNNING`.", "`JOB_STATE_DRAINING` indicates that the job is in the process of draining.\nA draining job has stopped pulling from its input sources and is processing\nany data that remains in-flight. This state may be set via a Cloud Dataflow\n`UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. Jobs\nthat are draining may only transition to `JOB_STATE_DRAINED`,\n`JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`.", "`JOB_STATE_DRAINED` indicates that the job has been drained.\nA drained job terminated by stopping pulling from its input sources and\nprocessing any data that remained in-flight when draining was requested.\nThis state is a terminal state, may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_DRAINING`.", - "`JOB_STATE_PENDING` indicates that the job has been created but is not yet\nrunning. Jobs that are pending may only transition to `JOB_STATE_RUNNING`,\nor `JOB_STATE_FAILED`.", - "`JOB_STATE_CANCELLING` indicates that the job has been explicitly cancelled\nand is in the process of stopping. Jobs that are cancelling may only\ntransition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`.", - "`JOB_STATE_QUEUED` indicates that the job has been created but is being\ndelayed until launch. Jobs that are queued may only transition to\n`JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`." + "'JOB_STATE_PENDING' indicates that the job has been created but is not yet\nrunning. Jobs that are pending may only transition to `JOB_STATE_RUNNING`,\nor `JOB_STATE_FAILED`.", + "'JOB_STATE_CANCELLING' indicates that the job has been explicitly cancelled\nand is in the process of stopping. Jobs that are cancelling may only\ntransition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'." ], "type": "string" }, @@ -2837,11 +2831,6 @@ }, "type": "array" }, - "startTime": { - "description": "The timestamp when the job was started (transitioned to JOB_STATE_PENDING).\nFlexible resource scheduling jobs are started with some delay after job\ncreation, so start_time is unset before start and is updated when the\njob is started by the Cloud Dataflow service. For other jobs, start_time\nalways equals to create_time and is immutable and set by the Cloud Dataflow\nservice.", - "format": "google-datetime", - "type": "string" - }, "steps": { "description": "The top-level steps that constitute the entire job.", "items": { @@ -3206,10 +3195,6 @@ "description": "MapTask consists of an ordered set of instructions, each of which\ndescribes one particular low-level operation for the worker to\nperform in order to accomplish the MapTask's WorkItem.\n\nEach instruction must appear in the list before any instructions which\ndepends on its output.", "id": "MapTask", "properties": { - "counterPrefix": { - "description": "Counter prefix that can be used to prefix counters. Not currently used in\nDataflow.", - "type": "string" - }, "instructions": { "description": "The instructions in the MapTask.", "items": { @@ -4422,21 +4407,6 @@ }, "type": "object" }, - "StreamingApplianceSnapshotConfig": { - "description": "Streaming appliance snapshot configuration.", - "id": "StreamingApplianceSnapshotConfig", - "properties": { - "importStateEndpoint": { - "description": "Indicates which endpoint is used to import appliance state.", - "type": "string" - }, - "snapshotId": { - "description": "If set, indicates the snapshot id for the snapshot being performed.", - "type": "string" - } - }, - "type": "object" - }, "StreamingComputationConfig": { "description": "Configuration information for a single streaming computation.", "id": "StreamingComputationConfig", @@ -4559,10 +4529,6 @@ "format": "int32", "type": "integer" }, - "snapshotConfig": { - "$ref": "StreamingApplianceSnapshotConfig", - "description": "Configures streaming appliance snapshot." - }, "streamingComputationTopology": { "$ref": "TopologyConfig", "description": "The global topology of the streaming Dataflow job." diff --git a/vendor/google.golang.org/api/dataflow/v1b3/dataflow-gen.go b/vendor/google.golang.org/api/dataflow/v1b3/dataflow-gen.go index c356fd00..c755fc2b 100644 --- a/vendor/google.golang.org/api/dataflow/v1b3/dataflow-gen.go +++ b/vendor/google.golang.org/api/dataflow/v1b3/dataflow-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -1700,21 +1699,16 @@ type ExecutionStageState struct { // This state is a terminal state, may only be set by the Cloud // Dataflow // service, and only as a transition from `JOB_STATE_DRAINING`. - // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job + // "JOB_STATE_PENDING" - 'JOB_STATE_PENDING' indicates that the job // has been created but is not yet // running. Jobs that are pending may only transition to // `JOB_STATE_RUNNING`, // or `JOB_STATE_FAILED`. - // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the + // "JOB_STATE_CANCELLING" - 'JOB_STATE_CANCELLING' indicates that the // job has been explicitly cancelled // and is in the process of stopping. Jobs that are cancelling may // only - // transition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`. - // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has - // been created but is being - // delayed until launch. Jobs that are queued may only transition - // to - // `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. + // transition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'. ExecutionStageState string `json:"executionStageState,omitempty"` // ForceSendFields is a list of field names (e.g. "CurrentStateTime") to @@ -2396,21 +2390,16 @@ type Job struct { // This state is a terminal state, may only be set by the Cloud // Dataflow // service, and only as a transition from `JOB_STATE_DRAINING`. - // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job + // "JOB_STATE_PENDING" - 'JOB_STATE_PENDING' indicates that the job // has been created but is not yet // running. Jobs that are pending may only transition to // `JOB_STATE_RUNNING`, // or `JOB_STATE_FAILED`. - // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the + // "JOB_STATE_CANCELLING" - 'JOB_STATE_CANCELLING' indicates that the // job has been explicitly cancelled // and is in the process of stopping. Jobs that are cancelling may // only - // transition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`. - // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has - // been created but is being - // delayed until launch. Jobs that are queued may only transition - // to - // `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. + // transition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'. CurrentState string `json:"currentState,omitempty"` // CurrentStateTime: The timestamp associated with the current state. @@ -2561,21 +2550,16 @@ type Job struct { // This state is a terminal state, may only be set by the Cloud // Dataflow // service, and only as a transition from `JOB_STATE_DRAINING`. - // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job + // "JOB_STATE_PENDING" - 'JOB_STATE_PENDING' indicates that the job // has been created but is not yet // running. Jobs that are pending may only transition to // `JOB_STATE_RUNNING`, // or `JOB_STATE_FAILED`. - // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the + // "JOB_STATE_CANCELLING" - 'JOB_STATE_CANCELLING' indicates that the // job has been explicitly cancelled // and is in the process of stopping. Jobs that are cancelling may // only - // transition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`. - // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has - // been created but is being - // delayed until launch. Jobs that are queued may only transition - // to - // `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. + // transition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'. RequestedState string `json:"requestedState,omitempty"` // StageStates: This field may be mutated by the Cloud Dataflow @@ -2583,19 +2567,6 @@ type Job struct { // callers cannot mutate it. StageStates []*ExecutionStageState `json:"stageStates,omitempty"` - // StartTime: The timestamp when the job was started (transitioned to - // JOB_STATE_PENDING). - // Flexible resource scheduling jobs are started with some delay after - // job - // creation, so start_time is unset before start and is updated when - // the - // job is started by the Cloud Dataflow service. For other jobs, - // start_time - // always equals to create_time and is immutable and set by the Cloud - // Dataflow - // service. - StartTime string `json:"startTime,omitempty"` - // Steps: The top-level steps that constitute the entire job. Steps []*Step `json:"steps,omitempty"` @@ -3237,11 +3208,6 @@ func (s *ListJobsResponse) MarshalJSON() ([]byte, error) { // which // depends on its output. type MapTask struct { - // CounterPrefix: Counter prefix that can be used to prefix counters. - // Not currently used in - // Dataflow. - CounterPrefix string `json:"counterPrefix,omitempty"` - // Instructions: The instructions in the MapTask. Instructions []*ParallelInstruction `json:"instructions,omitempty"` @@ -3254,7 +3220,7 @@ type MapTask struct { // Unique across the workflow. SystemName string `json:"systemName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CounterPrefix") to + // ForceSendFields is a list of field names (e.g. "Instructions") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -3262,7 +3228,7 @@ type MapTask struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CounterPrefix") to include + // NullFields is a list of field names (e.g. "Instructions") 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 @@ -5508,41 +5474,6 @@ func (s *StreamLocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// StreamingApplianceSnapshotConfig: Streaming appliance snapshot -// configuration. -type StreamingApplianceSnapshotConfig struct { - // ImportStateEndpoint: Indicates which endpoint is used to import - // appliance state. - ImportStateEndpoint string `json:"importStateEndpoint,omitempty"` - - // SnapshotId: If set, indicates the snapshot id for the snapshot being - // performed. - SnapshotId string `json:"snapshotId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ImportStateEndpoint") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ImportStateEndpoint") 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 *StreamingApplianceSnapshotConfig) MarshalJSON() ([]byte, error) { - type NoMethod StreamingApplianceSnapshotConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // StreamingComputationConfig: Configuration information for a single // streaming computation. type StreamingComputationConfig struct { @@ -5722,9 +5653,6 @@ type StreamingSetupTask struct { // other streaming computation workers. ReceiveWorkPort int64 `json:"receiveWorkPort,omitempty"` - // SnapshotConfig: Configures streaming appliance snapshot. - SnapshotConfig *StreamingApplianceSnapshotConfig `json:"snapshotConfig,omitempty"` - // StreamingComputationTopology: The global topology of the streaming // Dataflow job. StreamingComputationTopology *TopologyConfig `json:"streamingComputationTopology,omitempty"` @@ -7157,13 +7085,9 @@ func (c *ProjectsWorkerMessagesCall) 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, "v1b3/projects/{projectId}/WorkerMessages") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -7356,13 +7280,9 @@ func (c *ProjectsJobsAggregatedCall) doRequest(alt string) (*http.Response, erro } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs:aggregated") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -7580,13 +7500,9 @@ func (c *ProjectsJobsCreateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -7771,13 +7687,9 @@ func (c *ProjectsJobsGetCall) 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, "v1b3/projects/{projectId}/jobs/{jobId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -7957,13 +7869,9 @@ func (c *ProjectsJobsGetMetricsCall) doRequest(alt string) (*http.Response, erro } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/metrics") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -8172,13 +8080,9 @@ func (c *ProjectsJobsListCall) 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, "v1b3/projects/{projectId}/jobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -8378,13 +8282,9 @@ func (c *ProjectsJobsUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -8535,13 +8435,9 @@ func (c *ProjectsJobsDebugGetConfigCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -8686,13 +8582,9 @@ func (c *ProjectsJobsDebugSendCaptureCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -8901,13 +8793,9 @@ func (c *ProjectsJobsMessagesListCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/messages") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9111,13 +8999,9 @@ func (c *ProjectsJobsWorkItemsLeaseCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9263,13 +9147,9 @@ func (c *ProjectsJobsWorkItemsReportStatusCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9414,13 +9294,9 @@ func (c *ProjectsLocationsWorkerMessagesCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/WorkerMessages") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9585,13 +9461,9 @@ func (c *ProjectsLocationsJobsCreateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9774,13 +9646,9 @@ func (c *ProjectsLocationsJobsGetCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -9958,13 +9826,9 @@ func (c *ProjectsLocationsJobsGetMetricsCall) doRequest(alt string) (*http.Respo } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10171,13 +10035,9 @@ func (c *ProjectsLocationsJobsListCall) 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, "v1b3/projects/{projectId}/locations/{location}/jobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10375,13 +10235,9 @@ func (c *ProjectsLocationsJobsUpdateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10537,13 +10393,9 @@ func (c *ProjectsLocationsJobsDebugGetConfigCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10698,13 +10550,9 @@ func (c *ProjectsLocationsJobsDebugSendCaptureCall) doRequest(alt string) (*http } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -10916,13 +10764,9 @@ func (c *ProjectsLocationsJobsMessagesListCall) 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, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11131,13 +10975,9 @@ func (c *ProjectsLocationsJobsWorkItemsLeaseCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11293,13 +11133,9 @@ func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) doRequest(alt string) ( } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11452,13 +11288,9 @@ func (c *ProjectsLocationsTemplatesCreateCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11629,13 +11461,9 @@ func (c *ProjectsLocationsTemplatesGetCall) 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, "v1b3/projects/{projectId}/locations/{location}/templates:get") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11807,13 +11635,9 @@ func (c *ProjectsLocationsTemplatesLaunchCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates:launch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -11966,13 +11790,9 @@ func (c *ProjectsTemplatesCreateCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -12140,13 +11960,9 @@ func (c *ProjectsTemplatesGetCall) 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, "v1b3/projects/{projectId}/templates:get") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, @@ -12320,13 +12136,9 @@ func (c *ProjectsTemplatesLaunchCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates:launch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, diff --git a/vendor/google.golang.org/api/dataproc/v1/dataproc-api.json b/vendor/google.golang.org/api/dataproc/v1/dataproc-api.json index 4c00d634..7fc3f9ef 100644 --- a/vendor/google.golang.org/api/dataproc/v1/dataproc-api.json +++ b/vendor/google.golang.org/api/dataproc/v1/dataproc-api.json @@ -106,313 +106,6 @@ "resources": { "projects": { "resources": { - "locations": { - "resources": { - "workflowTemplates": { - "methods": { - "create": { - "description": "Creates new workflow template.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates", - "httpMethod": "POST", - "id": "dataproc.projects.locations.workflowTemplates.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The \"resource name\" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/workflowTemplates", - "request": { - "$ref": "WorkflowTemplate" - }, - "response": { - "$ref": "WorkflowTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a workflow template. It does not cancel in-progress workflows.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}", - "httpMethod": "DELETE", - "id": "dataproc.projects.locations.workflowTemplates.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The \"resource name\" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$", - "required": true, - "type": "string" - }, - "version": { - "description": "Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.", - "format": "int32", - "location": "query", - "type": "integer" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Retrieves the latest workflow template.Can retrieve previously instantiated template by specifying optional version parameter.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}", - "httpMethod": "GET", - "id": "dataproc.projects.locations.workflowTemplates.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The \"resource name\" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$", - "required": true, - "type": "string" - }, - "version": { - "description": "Optional. The version of workflow template to retrieve. Only previously instatiated versions can be retrieved.If unspecified, retrieves the current version.", - "format": "int32", - "location": "query", - "type": "integer" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkflowTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:getIamPolicy", - "httpMethod": "POST", - "id": "dataproc.projects.locations.workflowTemplates.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "instantiate": { - "description": "Instantiates a template and begins execution.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata.On successful completion, Operation.response will be Empty.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:instantiate", - "httpMethod": "POST", - "id": "dataproc.projects.locations.workflowTemplates.instantiate", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The \"resource name\" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:instantiate", - "request": { - "$ref": "InstantiateWorkflowTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "instantiateInline": { - "description": "Instantiates a template and begins execution.This method is equivalent to executing the sequence CreateWorkflowTemplate, InstantiateWorkflowTemplate, DeleteWorkflowTemplate.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata.On successful completion, Operation.response will be Empty.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates:instantiateInline", - "httpMethod": "POST", - "id": "dataproc.projects.locations.workflowTemplates.instantiateInline", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The \"resource name\" of the workflow template region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/workflowTemplates:instantiateInline", - "request": { - "$ref": "WorkflowTemplate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists workflows that match the specified filter in the request.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates", - "httpMethod": "GET", - "id": "dataproc.projects.locations.workflowTemplates.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return in each response.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The page token, returned by a previous call, to request the next page of results.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The \"resource name\" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/workflowTemplates", - "response": { - "$ref": "ListWorkflowTemplatesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:setIamPolicy", - "httpMethod": "POST", - "id": "dataproc.projects.locations.workflowTemplates.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:testIamPermissions", - "httpMethod": "POST", - "id": "dataproc.projects.locations.workflowTemplates.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "update": { - "description": "Updates (replaces) workflow template. The updated template must contain version that matches the current server version.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}", - "httpMethod": "PUT", - "id": "dataproc.projects.locations.workflowTemplates.update", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Output only. The \"resource name\" of the template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "WorkflowTemplate" - }, - "response": { - "$ref": "WorkflowTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, "regions": { "resources": { "clusters": { @@ -583,34 +276,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:getIamPolicy", - "httpMethod": "POST", - "id": "dataproc.projects.regions.clusters.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "list": { "description": "Lists all regions/{region}/clusters in a project.", "flatPath": "v1/projects/{projectId}/regions/{region}/clusters", @@ -715,62 +380,6 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:setIamPolicy", - "httpMethod": "POST", - "id": "dataproc.projects.regions.clusters.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:testIamPermissions", - "httpMethod": "POST", - "id": "dataproc.projects.regions.clusters.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } } }, @@ -893,34 +502,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/jobs/{jobsId}:getIamPolicy", - "httpMethod": "POST", - "id": "dataproc.projects.regions.jobs.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/jobs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "list": { "description": "Lists regions/{region}/jobs in a project.", "flatPath": "v1/projects/{projectId}/regions/{region}/jobs", @@ -1030,34 +611,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/jobs/{jobsId}:setIamPolicy", - "httpMethod": "POST", - "id": "dataproc.projects.regions.jobs.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/jobs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "submit": { "description": "Submits a job to a cluster.", "flatPath": "v1/projects/{projectId}/regions/{region}/jobs:submit", @@ -1091,34 +644,6 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/jobs/{jobsId}:testIamPermissions", - "httpMethod": "POST", - "id": "dataproc.projects.regions.jobs.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/jobs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } } }, @@ -1199,34 +724,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:getIamPolicy", - "httpMethod": "POST", - "id": "dataproc.projects.regions.operations.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "list": { "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations", @@ -1267,365 +764,6 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:setIamPolicy", - "httpMethod": "POST", - "id": "dataproc.projects.regions.operations.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:testIamPermissions", - "httpMethod": "POST", - "id": "dataproc.projects.regions.operations.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "workflowTemplates": { - "methods": { - "create": { - "description": "Creates new workflow template.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates", - "httpMethod": "POST", - "id": "dataproc.projects.regions.workflowTemplates.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The \"resource name\" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/workflowTemplates", - "request": { - "$ref": "WorkflowTemplate" - }, - "response": { - "$ref": "WorkflowTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a workflow template. It does not cancel in-progress workflows.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}", - "httpMethod": "DELETE", - "id": "dataproc.projects.regions.workflowTemplates.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The \"resource name\" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$", - "required": true, - "type": "string" - }, - "version": { - "description": "Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.", - "format": "int32", - "location": "query", - "type": "integer" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Retrieves the latest workflow template.Can retrieve previously instantiated template by specifying optional version parameter.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}", - "httpMethod": "GET", - "id": "dataproc.projects.regions.workflowTemplates.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The \"resource name\" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$", - "required": true, - "type": "string" - }, - "version": { - "description": "Optional. The version of workflow template to retrieve. Only previously instatiated versions can be retrieved.If unspecified, retrieves the current version.", - "format": "int32", - "location": "query", - "type": "integer" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WorkflowTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:getIamPolicy", - "httpMethod": "POST", - "id": "dataproc.projects.regions.workflowTemplates.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "instantiate": { - "description": "Instantiates a template and begins execution.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata.On successful completion, Operation.response will be Empty.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:instantiate", - "httpMethod": "POST", - "id": "dataproc.projects.regions.workflowTemplates.instantiate", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The \"resource name\" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:instantiate", - "request": { - "$ref": "InstantiateWorkflowTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "instantiateInline": { - "description": "Instantiates a template and begins execution.This method is equivalent to executing the sequence CreateWorkflowTemplate, InstantiateWorkflowTemplate, DeleteWorkflowTemplate.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata.On successful completion, Operation.response will be Empty.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates:instantiateInline", - "httpMethod": "POST", - "id": "dataproc.projects.regions.workflowTemplates.instantiateInline", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The \"resource name\" of the workflow template region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/workflowTemplates:instantiateInline", - "request": { - "$ref": "WorkflowTemplate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists workflows that match the specified filter in the request.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates", - "httpMethod": "GET", - "id": "dataproc.projects.regions.workflowTemplates.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of results to return in each response.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The page token, returned by a previous call, to request the next page of results.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The \"resource name\" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/workflowTemplates", - "response": { - "$ref": "ListWorkflowTemplatesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:setIamPolicy", - "httpMethod": "POST", - "id": "dataproc.projects.regions.workflowTemplates.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:testIamPermissions", - "httpMethod": "POST", - "id": "dataproc.projects.regions.workflowTemplates.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "update": { - "description": "Updates (replaces) workflow template. The updated template must contain version that matches the current server version.", - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}", - "httpMethod": "PUT", - "id": "dataproc.projects.regions.workflowTemplates.update", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Output only. The \"resource name\" of the template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", - "location": "path", - "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "WorkflowTemplate" - }, - "response": { - "$ref": "WorkflowTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } } } @@ -1634,7 +772,7 @@ } } }, - "revision": "20181019", + "revision": "20180702", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1653,28 +791,6 @@ }, "type": "object" }, - "Binding": { - "description": "Associates members with a role.", - "id": "Binding", - "properties": { - "condition": { - "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently." - }, - "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:\nallUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.\nallAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account.\nuser:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com .\nserviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.\ngroup:{emailid}: An email address that represents a Google group. For example, admins@example.com.\ndomain:{domain}: A Google Apps domain name that represents all the users of that domain. For example, google.com or example.com.", - "items": { - "type": "string" - }, - "type": "array" - }, - "role": { - "description": "Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.", - "type": "string" - } - }, - "type": "object" - }, "CancelJobRequest": { "description": "A request to cancel a job.", "id": "CancelJobRequest", @@ -1734,10 +850,6 @@ "description": "Optional. A Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.", "type": "string" }, - "encryptionConfig": { - "$ref": "EncryptionConfig", - "description": "Optional. Encryption settings for the cluster." - }, "gceClusterConfig": { "$ref": "GceClusterConfig", "description": "Required. The shared Compute Engine config settings for all instances in a cluster." @@ -1894,24 +1006,6 @@ }, "type": "object" }, - "ClusterSelector": { - "description": "A selector that chooses target cluster for jobs based on metadata.", - "id": "ClusterSelector", - "properties": { - "clusterLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Required. The cluster labels. Cluster must have all labels to match.", - "type": "object" - }, - "zone": { - "description": "Optional. The zone where workflow process executes. This parameter does not affect the selection of the cluster.If unspecified, the zone of the first cluster matching the selector is used.", - "type": "string" - } - }, - "type": "object" - }, "ClusterStatus": { "description": "The status of a cluster and its instances.", "id": "ClusterStatus", @@ -2006,40 +1100,6 @@ "properties": {}, "type": "object" }, - "EncryptionConfig": { - "description": "Encryption settings for the cluster.", - "id": "EncryptionConfig", - "properties": { - "gcePdKmsKeyName": { - "description": "Optional. The Cloud KMS key name to use for PD disk encryption for all instances in the cluster.", - "type": "string" - } - }, - "type": "object" - }, - "Expr": { - "description": "Represents an expression text. Example:\ntitle: \"User account presence\"\ndescription: \"Determines whether the request has a user account\"\nexpression: \"size(request.user) \u003e 0\"\n", - "id": "Expr", - "properties": { - "description": { - "description": "An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", - "type": "string" - }, - "expression": { - "description": "Textual representation of an expression in Common Expression Language syntax.The application context of the containing message determines which well-known feature set of CEL is supported.", - "type": "string" - }, - "location": { - "description": "An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", - "type": "string" - }, - "title": { - "description": "An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", - "type": "string" - } - }, - "type": "object" - }, "GceClusterConfig": { "description": "Common config settings for resources of Compute Engine cluster instances, applicable to all instances in the cluster.", "id": "GceClusterConfig", @@ -2088,12 +1148,6 @@ }, "type": "object" }, - "GetIamPolicyRequest": { - "description": "Request message for GetIamPolicy method.", - "id": "GetIamPolicyRequest", - "properties": {}, - "type": "object" - }, "HadoopJob": { "description": "A Cloud Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).", "id": "HadoopJob", @@ -2234,29 +1288,6 @@ }, "type": "object" }, - "InstantiateWorkflowTemplateRequest": { - "description": "A request to instantiate a workflow template.", - "id": "InstantiateWorkflowTemplateRequest", - "properties": { - "parameters": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Map from parameter names to values that should be used for those parameters. Values may not exceed 100 characters.", - "type": "object" - }, - "requestId": { - "description": "Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", - "type": "string" - }, - "version": { - "description": "Optional. The version of workflow template to instantiate. If specified, the workflow will be instantiated only if the current version of the workflow template has the supplied version.This option cannot be used to instantiate a previous version of workflow template.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "Job": { "description": "A Cloud Dataproc job resource.", "id": "Job", @@ -2489,24 +1520,6 @@ }, "type": "object" }, - "ListWorkflowTemplatesResponse": { - "description": "A response to a request to list workflow templates in a project.", - "id": "ListWorkflowTemplatesResponse", - "properties": { - "nextPageToken": { - "description": "Output only. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent \u003ccode\u003eListWorkflowTemplatesRequest\u003c/code\u003e.", - "type": "string" - }, - "templates": { - "description": "Output only. WorkflowTemplates list.", - "items": { - "$ref": "WorkflowTemplate" - }, - "type": "array" - } - }, - "type": "object" - }, "LoggingConfig": { "description": "The runtime logging config of the job.", "id": "LoggingConfig", @@ -2532,28 +1545,6 @@ }, "type": "object" }, - "ManagedCluster": { - "description": "Cluster that is managed by the workflow.", - "id": "ManagedCluster", - "properties": { - "clusterName": { - "description": "Required. The cluster name prefix. A unique cluster name will be formed by appending a random suffix.The name must contain only lower-case letters (a-z), numbers (0-9), and hyphens (-). Must begin with a letter. Cannot begin or end with hyphen. Must consist of between 2 and 35 characters.", - "type": "string" - }, - "config": { - "$ref": "ClusterConfig", - "description": "Required. The cluster configuration." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. The labels to associate with this cluster.Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \\p{Ll}\\p{Lo}{0,62}Label values must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \\p{Ll}\\p{Lo}\\p{N}_-{0,63}No more than 32 labels can be associated with a given cluster.", - "type": "object" - } - }, - "type": "object" - }, "ManagedGroupConfig": { "description": "Specifies the resources used to actively manage an instance group.", "id": "ManagedGroupConfig", @@ -2620,74 +1611,6 @@ }, "type": "object" }, - "OrderedJob": { - "description": "A job executed by the workflow.", - "id": "OrderedJob", - "properties": { - "hadoopJob": { - "$ref": "HadoopJob", - "description": "Job is a Hadoop job." - }, - "hiveJob": { - "$ref": "HiveJob", - "description": "Job is a Hive job." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. The labels to associate with this job.Label keys must be between 1 and 63 characters long, and must conform to the following regular expression: \\p{Ll}\\p{Lo}{0,62}Label values must be between 1 and 63 characters long, and must conform to the following regular expression: \\p{Ll}\\p{Lo}\\p{N}_-{0,63}No more than 32 labels can be associated with a given job.", - "type": "object" - }, - "pigJob": { - "$ref": "PigJob", - "description": "Job is a Pig job." - }, - "prerequisiteStepIds": { - "description": "Optional. The optional list of prerequisite job step_ids. If not specified, the job will start at the beginning of workflow.", - "items": { - "type": "string" - }, - "type": "array" - }, - "pysparkJob": { - "$ref": "PySparkJob", - "description": "Job is a Pyspark job." - }, - "scheduling": { - "$ref": "JobScheduling", - "description": "Optional. Job scheduling configuration." - }, - "sparkJob": { - "$ref": "SparkJob", - "description": "Job is a Spark job." - }, - "sparkSqlJob": { - "$ref": "SparkSqlJob", - "description": "Job is a SparkSql job." - }, - "stepId": { - "description": "Required. The step id. The id must be unique among all jobs within the template.The step id is used as prefix for job id, as job goog-dataproc-workflow-step-id label, and in prerequisiteStepIds field from other steps.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.", - "type": "string" - } - }, - "type": "object" - }, - "ParameterValidation": { - "description": "Configuration for parameter validation.", - "id": "ParameterValidation", - "properties": { - "regex": { - "$ref": "RegexValidation", - "description": "Validation based on regular expressions." - }, - "values": { - "$ref": "ValueValidation", - "description": "Validation based on a list of allowed values." - } - }, - "type": "object" - }, "PigJob": { "description": "A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN.", "id": "PigJob", @@ -2732,30 +1655,6 @@ }, "type": "object" }, - "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.A Policy consists of a list of bindings. A binding binds a list of members to a role, where the members can be user accounts, Google groups, Google domains, and service accounts. A role is a named list of permissions defined by IAM.JSON Example\n{\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\"\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n}\nYAML Example\nbindings:\n- members:\n - user:mike@example.com\n - group:admins@example.com\n - domain:google.com\n - serviceAccount:my-other-app@appspot.gserviceaccount.com\n role: roles/owner\n- members:\n - user:sean@example.com\n role: roles/viewer\nFor a description of IAM and its features, see the IAM developer's guide (https://cloud.google.com/iam/docs).", - "id": "Policy", - "properties": { - "bindings": { - "description": "Associates a list of members to a role. bindings with no members will result in an error.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.If no etag is provided in the call to setIamPolicy, then the existing policy is overwritten blindly.", - "format": "byte", - "type": "string" - }, - "version": { - "description": "Deprecated.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "PySparkJob": { "description": "A Cloud Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN.", "id": "PySparkJob", @@ -2827,31 +1726,6 @@ }, "type": "object" }, - "RegexValidation": { - "description": "Validation based on regular expressions.", - "id": "RegexValidation", - "properties": { - "regexes": { - "description": "Required. RE2 regular expressions used to validate the parameter's value. The value must match the regex in its entirety (substring matches are not sufficient).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SetIamPolicyRequest": { - "description": "Request message for SetIamPolicy method.", - "id": "SetIamPolicyRequest", - "properties": { - "policy": { - "$ref": "Policy", - "description": "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 a valid policy but certain Cloud Platform services (such as Projects) might reject them." - } - }, - "type": "object" - }, "SoftwareConfig": { "description": "Specifies the selection and config of software inside the cluster.", "id": "SoftwareConfig", @@ -3006,74 +1880,6 @@ }, "type": "object" }, - "TemplateParameter": { - "description": "A configurable parameter that replaces one or more fields in the template. Parameterizable fields: - Labels - File uris - Job properties - Job arguments - Script variables - Main class (in HadoopJob and SparkJob) - Zone (in ClusterSelector)", - "id": "TemplateParameter", - "properties": { - "description": { - "description": "Optional. Brief description of the parameter. Must not exceed 1024 characters.", - "type": "string" - }, - "fields": { - "description": "Required. Paths to all fields that the parameter replaces. A field is allowed to appear in at most one parameter's list of field paths.A field path is similar in syntax to a google.protobuf.FieldMask. For example, a field path that references the zone field of a workflow template's cluster selector would be specified as placement.clusterSelector.zone.Also, field paths can reference fields using the following syntax:\nValues in maps can be referenced by key:\nlabels'key'\nplacement.clusterSelector.clusterLabels'key'\nplacement.managedCluster.labels'key'\nplacement.clusterSelector.clusterLabels'key'\njobs'step-id'.labels'key'\nJobs in the jobs list can be referenced by step-id:\njobs'step-id'.hadoopJob.mainJarFileUri\njobs'step-id'.hiveJob.queryFileUri\njobs'step-id'.pySparkJob.mainPythonFileUri\njobs'step-id'.hadoopJob.jarFileUris0\njobs'step-id'.hadoopJob.archiveUris0\njobs'step-id'.hadoopJob.fileUris0\njobs'step-id'.pySparkJob.pythonFileUris0\nItems in repeated fields can be referenced by a zero-based index:\njobs'step-id'.sparkJob.args0\nOther examples:\njobs'step-id'.hadoopJob.properties'key'\njobs'step-id'.hadoopJob.args0\njobs'step-id'.hiveJob.scriptVariables'key'\njobs'step-id'.hadoopJob.mainJarFileUri\nplacement.clusterSelector.zoneIt may not be possible to parameterize maps and repeated fields in their entirety since only individual map values and individual items in repeated fields can be referenced. For example, the following field paths are invalid:\nplacement.clusterSelector.clusterLabels\njobs'step-id'.sparkJob.args", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Required. Parameter name. The parameter name is used as the key, and paired with the parameter value, which are passed to the template when the template is instantiated. The name must contain only capital letters (A-Z), numbers (0-9), and underscores (_), and must not start with a number. The maximum length is 40 characters.", - "type": "string" - }, - "validation": { - "$ref": "ParameterValidation", - "description": "Optional. Validation rules to be applied to this parameter's value." - } - }, - "type": "object" - }, - "TestIamPermissionsRequest": { - "description": "Request message for TestIamPermissions method.", - "id": "TestIamPermissionsRequest", - "properties": { - "permissions": { - "description": "The set of permissions to check for the resource. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestIamPermissionsResponse": { - "description": "Response message for TestIamPermissions method.", - "id": "TestIamPermissionsResponse", - "properties": { - "permissions": { - "description": "A subset of TestPermissionsRequest.permissions that the caller is allowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ValueValidation": { - "description": "Validation based on a list of allowed values.", - "id": "ValueValidation", - "properties": { - "values": { - "description": "Required. List of allowed values for the parameter.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "WorkflowGraph": { "description": "The workflow graph.", "id": "WorkflowGraph", @@ -3104,11 +1910,6 @@ "$ref": "ClusterOperation", "description": "Output only. The delete cluster operation metadata." }, - "endTime": { - "description": "Output only. Workflow end time.", - "format": "google-datetime", - "type": "string" - }, "graph": { "$ref": "WorkflowGraph", "description": "Output only. The workflow graph." @@ -3120,11 +1921,6 @@ "description": "Map from parameter names to values that were used for those parameters.", "type": "object" }, - "startTime": { - "description": "Output only. Workflow start time.", - "format": "google-datetime", - "type": "string" - }, "state": { "description": "Output only. The workflow state.", "enum": [ @@ -3199,76 +1995,6 @@ }, "type": "object" }, - "WorkflowTemplate": { - "description": "A Cloud Dataproc workflow template resource.", - "id": "WorkflowTemplate", - "properties": { - "createTime": { - "description": "Output only. The time template was created.", - "format": "google-datetime", - "type": "string" - }, - "id": { - "description": "Required. The template id.The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.", - "type": "string" - }, - "jobs": { - "description": "Required. The Directed Acyclic Graph of Jobs to submit.", - "items": { - "$ref": "OrderedJob" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance.Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).No more than 32 labels can be associated with a template.", - "type": "object" - }, - "name": { - "description": "Output only. The \"resource name\" of the template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", - "type": "string" - }, - "parameters": { - "description": "Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided when the template is instantiated.", - "items": { - "$ref": "TemplateParameter" - }, - "type": "array" - }, - "placement": { - "$ref": "WorkflowTemplatePlacement", - "description": "Required. WorkflowTemplate scheduling information." - }, - "updateTime": { - "description": "Output only. The time template was last updated.", - "format": "google-datetime", - "type": "string" - }, - "version": { - "description": "Optional. Used to perform a consistent read-modify-write.This field should be left blank for a CreateWorkflowTemplate request. It is required for an UpdateWorkflowTemplate request, and must match the current server version. A typical update template flow would fetch the current template with a GetWorkflowTemplate request, which will return the current template with the version field filled in with the current server version. The user updates other fields in the template, then returns it as part of the UpdateWorkflowTemplate request.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "WorkflowTemplatePlacement": { - "description": "Specifies workflow execution target.Either managed_cluster or cluster_selector is required.", - "id": "WorkflowTemplatePlacement", - "properties": { - "clusterSelector": { - "$ref": "ClusterSelector", - "description": "Optional. A selector that chooses target cluster for jobs based on metadata.The selector is evaluated at the time each job is submitted." - }, - "managedCluster": { - "$ref": "ManagedCluster", - "description": "Optional. A cluster that is managed by the workflow." - } - }, - "type": "object" - }, "YarnApplication": { "description": "A YARN application created by a job. Application information is a subset of \u003ccode\u003eorg.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto\u003c/code\u003e.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", "id": "YarnApplication", diff --git a/vendor/google.golang.org/api/dataproc/v1/dataproc-gen.go b/vendor/google.golang.org/api/dataproc/v1/dataproc-gen.go index 9d90859d..598ef72e 100644 --- a/vendor/google.golang.org/api/dataproc/v1/dataproc-gen.go +++ b/vendor/google.golang.org/api/dataproc/v1/dataproc-gen.go @@ -16,16 +16,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -80,7 +79,6 @@ func (s *Service) userAgent() string { func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} - rs.Locations = NewProjectsLocationsService(s) rs.Regions = NewProjectsRegionsService(s) return rs } @@ -88,38 +86,14 @@ func NewProjectsService(s *Service) *ProjectsService { type ProjectsService struct { s *Service - Locations *ProjectsLocationsService - Regions *ProjectsRegionsService } -func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { - rs := &ProjectsLocationsService{s: s} - rs.WorkflowTemplates = NewProjectsLocationsWorkflowTemplatesService(s) - return rs -} - -type ProjectsLocationsService struct { - s *Service - - WorkflowTemplates *ProjectsLocationsWorkflowTemplatesService -} - -func NewProjectsLocationsWorkflowTemplatesService(s *Service) *ProjectsLocationsWorkflowTemplatesService { - rs := &ProjectsLocationsWorkflowTemplatesService{s: s} - return rs -} - -type ProjectsLocationsWorkflowTemplatesService struct { - s *Service -} - func NewProjectsRegionsService(s *Service) *ProjectsRegionsService { rs := &ProjectsRegionsService{s: s} rs.Clusters = NewProjectsRegionsClustersService(s) rs.Jobs = NewProjectsRegionsJobsService(s) rs.Operations = NewProjectsRegionsOperationsService(s) - rs.WorkflowTemplates = NewProjectsRegionsWorkflowTemplatesService(s) return rs } @@ -131,8 +105,6 @@ type ProjectsRegionsService struct { Jobs *ProjectsRegionsJobsService Operations *ProjectsRegionsOperationsService - - WorkflowTemplates *ProjectsRegionsWorkflowTemplatesService } func NewProjectsRegionsClustersService(s *Service) *ProjectsRegionsClustersService { @@ -162,15 +134,6 @@ type ProjectsRegionsOperationsService struct { s *Service } -func NewProjectsRegionsWorkflowTemplatesService(s *Service) *ProjectsRegionsWorkflowTemplatesService { - rs := &ProjectsRegionsWorkflowTemplatesService{s: s} - return rs -} - -type ProjectsRegionsWorkflowTemplatesService struct { - s *Service -} - // AcceleratorConfig: Specifies the type and number of accelerator cards // attached to the instances of an instance. See GPUs on Compute Engine. type AcceleratorConfig struct { @@ -216,59 +179,6 @@ func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Binding: Associates members with a role. -type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. NOTE: an unsatisfied condition will not allow user access - // via current binding. Different bindings, including their conditions, - // are examined independently. - Condition *Expr `json:"condition,omitempty"` - - // Members: Specifies the identities requesting access for a Cloud - // Platform resource. members can have the following values: - // allUsers: A special identifier that represents anyone who is on the - // internet; with or without a Google account. - // allAuthenticatedUsers: A special identifier that represents anyone - // who is authenticated with a Google account or a service - // account. - // user:{emailid}: An email address that represents a specific Google - // account. For example, alice@gmail.com . - // serviceAccount:{emailid}: An email address that represents a service - // account. For example, - // my-other-app@appspot.gserviceaccount.com. - // group:{emailid}: An email address that represents a Google group. - // For example, admins@example.com. - // domain:{domain}: A Google Apps domain name that represents all the - // users of that domain. For example, google.com or example.com. - Members []string `json:"members,omitempty"` - - // Role: Role that is assigned to members. For example, roles/viewer, - // roles/editor, or roles/owner. - Role string `json:"role,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Condition") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Condition") 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 *Binding) MarshalJSON() ([]byte, error) { - type NoMethod Binding - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // CancelJobRequest: A request to cancel a job. type CancelJobRequest struct { } @@ -350,9 +260,6 @@ type ClusterConfig struct { // per-location bucket for you. ConfigBucket string `json:"configBucket,omitempty"` - // EncryptionConfig: Optional. Encryption settings for the cluster. - EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` - // GceClusterConfig: Required. The shared Compute Engine config settings // for all instances in a cluster. GceClusterConfig *GceClusterConfig `json:"gceClusterConfig,omitempty"` @@ -573,42 +480,6 @@ func (s *ClusterOperationStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ClusterSelector: A selector that chooses target cluster for jobs -// based on metadata. -type ClusterSelector struct { - // ClusterLabels: Required. The cluster labels. Cluster must have all - // labels to match. - ClusterLabels map[string]string `json:"clusterLabels,omitempty"` - - // Zone: Optional. The zone where workflow process executes. This - // parameter does not affect the selection of the cluster.If - // unspecified, the zone of the first cluster matching the selector is - // used. - Zone string `json:"zone,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClusterLabels") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClusterLabels") 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 *ClusterSelector) MarshalJSON() ([]byte, error) { - type NoMethod ClusterSelector - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ClusterStatus: The status of a cluster and its instances. type ClusterStatus struct { // Detail: Output only. Optional details of cluster's state. @@ -763,86 +634,6 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } -// EncryptionConfig: Encryption settings for the cluster. -type EncryptionConfig struct { - // GcePdKmsKeyName: Optional. The Cloud KMS key name to use for PD disk - // encryption for all instances in the cluster. - GcePdKmsKeyName string `json:"gcePdKmsKeyName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GcePdKmsKeyName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GcePdKmsKeyName") 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 *EncryptionConfig) MarshalJSON() ([]byte, error) { - type NoMethod EncryptionConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Expr: Represents an expression text. Example: -// title: "User account presence" -// description: "Determines whether the request has a user -// account" -// expression: "size(request.user) > 0" -// -type Expr struct { - // Description: An optional description of the expression. This is a - // longer text which describes the expression, e.g. when hovered over it - // in a UI. - Description string `json:"description,omitempty"` - - // Expression: Textual representation of an expression in Common - // Expression Language syntax.The application context of the containing - // message determines which well-known feature set of CEL is supported. - Expression string `json:"expression,omitempty"` - - // Location: An optional string indicating the location of the - // expression for error reporting, e.g. a file name and a position in - // the file. - Location string `json:"location,omitempty"` - - // Title: An optional title for the expression, i.e. a short string - // describing its purpose. This can be used e.g. in UIs which allow to - // enter the expression. - Title string `json:"title,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Expr) MarshalJSON() ([]byte, error) { - type NoMethod Expr - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GceClusterConfig: Common config settings for resources of Compute // Engine cluster instances, applicable to all instances in the cluster. type GceClusterConfig struct { @@ -955,10 +746,6 @@ func (s *GceClusterConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GetIamPolicyRequest: Request message for GetIamPolicy method. -type GetIamPolicyRequest struct { -} - // HadoopJob: A Cloud Dataproc job for running Apache Hadoop MapReduce // (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop // -mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop @@ -1153,52 +940,6 @@ func (s *InstanceGroupConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstantiateWorkflowTemplateRequest: A request to instantiate a -// workflow template. -type InstantiateWorkflowTemplateRequest struct { - // Parameters: Optional. Map from parameter names to values that should - // be used for those parameters. Values may not exceed 100 characters. - Parameters map[string]string `json:"parameters,omitempty"` - - // RequestId: Optional. A tag that prevents multiple concurrent workflow - // instances with the same tag from running. This mitigates risk of - // concurrent instances started due to retries.It is recommended to - // always set this value to a UUID - // (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag - // must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), - // and hyphens (-). The maximum length is 40 characters. - RequestId string `json:"requestId,omitempty"` - - // Version: Optional. The version of workflow template to instantiate. - // If specified, the workflow will be instantiated only if the current - // version of the workflow template has the supplied version.This option - // cannot be used to instantiate a previous version of workflow - // template. - Version int64 `json:"version,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Parameters") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Parameters") 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 *InstantiateWorkflowTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstantiateWorkflowTemplateRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Job: A Cloud Dataproc job resource. type Job struct { // DriverControlFilesUri: Output only. If present, the location of @@ -1577,45 +1318,6 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListWorkflowTemplatesResponse: A response to a request to list -// workflow templates in a project. -type ListWorkflowTemplatesResponse struct { - // NextPageToken: Output only. This token is included in the response if - // there are more results to fetch. To fetch additional results, provide - // this value as the page_token in a subsequent - // ListWorkflowTemplatesRequest. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Templates: Output only. WorkflowTemplates list. - Templates []*WorkflowTemplate `json:"templates,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListWorkflowTemplatesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWorkflowTemplatesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // LoggingConfig: The runtime logging config of the job. type LoggingConfig struct { // DriverLogLevels: The per-package log levels for the driver. This may @@ -1647,49 +1349,6 @@ func (s *LoggingConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ManagedCluster: Cluster that is managed by the workflow. -type ManagedCluster struct { - // ClusterName: Required. The cluster name prefix. A unique cluster name - // will be formed by appending a random suffix.The name must contain - // only lower-case letters (a-z), numbers (0-9), and hyphens (-). Must - // begin with a letter. Cannot begin or end with hyphen. Must consist of - // between 2 and 35 characters. - ClusterName string `json:"clusterName,omitempty"` - - // Config: Required. The cluster configuration. - Config *ClusterConfig `json:"config,omitempty"` - - // Labels: Optional. The labels to associate with this cluster.Label - // keys must be between 1 and 63 characters long, and must conform to - // the following PCRE regular expression: \p{Ll}\p{Lo}{0,62}Label values - // must be between 1 and 63 characters long, and must conform to the - // following PCRE regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more - // than 32 labels can be associated with a given cluster. - Labels map[string]string `json:"labels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClusterName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClusterName") 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 *ManagedCluster) MarshalJSON() ([]byte, error) { - type NoMethod ManagedCluster - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ManagedGroupConfig: Specifies the resources used to actively manage // an instance group. type ManagedGroupConfig struct { @@ -1824,105 +1483,6 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// OrderedJob: A job executed by the workflow. -type OrderedJob struct { - // HadoopJob: Job is a Hadoop job. - HadoopJob *HadoopJob `json:"hadoopJob,omitempty"` - - // HiveJob: Job is a Hive job. - HiveJob *HiveJob `json:"hiveJob,omitempty"` - - // Labels: Optional. The labels to associate with this job.Label keys - // must be between 1 and 63 characters long, and must conform to the - // following regular expression: \p{Ll}\p{Lo}{0,62}Label values must be - // between 1 and 63 characters long, and must conform to the following - // regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more than 32 labels - // can be associated with a given job. - Labels map[string]string `json:"labels,omitempty"` - - // PigJob: Job is a Pig job. - PigJob *PigJob `json:"pigJob,omitempty"` - - // PrerequisiteStepIds: Optional. The optional list of prerequisite job - // step_ids. If not specified, the job will start at the beginning of - // workflow. - PrerequisiteStepIds []string `json:"prerequisiteStepIds,omitempty"` - - // PysparkJob: Job is a Pyspark job. - PysparkJob *PySparkJob `json:"pysparkJob,omitempty"` - - // Scheduling: Optional. Job scheduling configuration. - Scheduling *JobScheduling `json:"scheduling,omitempty"` - - // SparkJob: Job is a Spark job. - SparkJob *SparkJob `json:"sparkJob,omitempty"` - - // SparkSqlJob: Job is a SparkSql job. - SparkSqlJob *SparkSqlJob `json:"sparkSqlJob,omitempty"` - - // StepId: Required. The step id. The id must be unique among all jobs - // within the template.The step id is used as prefix for job id, as job - // goog-dataproc-workflow-step-id label, and in prerequisiteStepIds - // field from other steps.The id must contain only letters (a-z, A-Z), - // numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end - // with underscore or hyphen. Must consist of between 3 and 50 - // characters. - StepId string `json:"stepId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HadoopJob") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HadoopJob") 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 *OrderedJob) MarshalJSON() ([]byte, error) { - type NoMethod OrderedJob - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ParameterValidation: Configuration for parameter validation. -type ParameterValidation struct { - // Regex: Validation based on regular expressions. - Regex *RegexValidation `json:"regex,omitempty"` - - // Values: Validation based on a list of allowed values. - Values *ValueValidation `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Regex") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Regex") 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 *ParameterValidation) MarshalJSON() ([]byte, error) { - type NoMethod ParameterValidation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // PigJob: A Cloud Dataproc job for running Apache Pig // (https://pig.apache.org/) queries on YARN. type PigJob struct { @@ -1981,88 +1541,6 @@ func (s *PigJob) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Policy: Defines an Identity and Access Management (IAM) policy. It is -// used to specify access control policies for Cloud Platform -// resources.A Policy consists of a list of bindings. A binding binds a -// list of members to a role, where the members can be user accounts, -// Google groups, Google domains, and service accounts. A role is a -// named list of permissions defined by IAM.JSON Example -// { -// "bindings": [ -// { -// "role": "roles/owner", -// "members": [ -// "user:mike@example.com", -// "group:admins@example.com", -// "domain:google.com", -// "serviceAccount:my-other-app@appspot.gserviceaccount.com" -// ] -// }, -// { -// "role": "roles/viewer", -// "members": ["user:sean@example.com"] -// } -// ] -// } -// YAML Example -// bindings: -// - members: -// - user:mike@example.com -// - group:admins@example.com -// - domain:google.com -// - serviceAccount:my-other-app@appspot.gserviceaccount.com -// role: roles/owner -// - members: -// - user:sean@example.com -// role: roles/viewer -// For a description of IAM and its features, see the IAM developer's -// guide (https://cloud.google.com/iam/docs). -type Policy struct { - // Bindings: Associates a list of members to a role. bindings with no - // members will result in an error. - Bindings []*Binding `json:"bindings,omitempty"` - - // Etag: etag is used for optimistic concurrency control as a way to - // help prevent simultaneous updates of a policy from overwriting each - // other. It is strongly suggested that systems make use of the etag in - // the read-modify-write cycle to perform policy updates in order to - // avoid race conditions: An etag is returned in the response to - // getIamPolicy, and systems are expected to put that etag in the - // request to setIamPolicy to ensure that their change will be applied - // to the same version of the policy.If no etag is provided in the call - // to setIamPolicy, then the existing policy is overwritten blindly. - Etag string `json:"etag,omitempty"` - - // Version: Deprecated. - Version int64 `json:"version,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Bindings") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "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 *Policy) MarshalJSON() ([]byte, error) { - type NoMethod Policy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // PySparkJob: A Cloud Dataproc job for running Apache PySpark // (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) // applications on YARN. @@ -2167,67 +1645,6 @@ func (s *QueryList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RegexValidation: Validation based on regular expressions. -type RegexValidation struct { - // Regexes: Required. RE2 regular expressions used to validate the - // parameter's value. The value must match the regex in its entirety - // (substring matches are not sufficient). - Regexes []string `json:"regexes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Regexes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Regexes") 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 *RegexValidation) MarshalJSON() ([]byte, error) { - type NoMethod RegexValidation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SetIamPolicyRequest: Request message for SetIamPolicy method. -type SetIamPolicyRequest struct { - // 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 a valid policy but certain Cloud Platform services (such as - // Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Policy") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Policy") 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 *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetIamPolicyRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // SoftwareConfig: Specifies the selection and config of software inside // the cluster. type SoftwareConfig struct { @@ -2500,193 +1917,6 @@ func (s *SubmitJobRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TemplateParameter: A configurable parameter that replaces one or more -// fields in the template. Parameterizable fields: - Labels - File uris -// - Job properties - Job arguments - Script variables - Main class (in -// HadoopJob and SparkJob) - Zone (in ClusterSelector) -type TemplateParameter struct { - // Description: Optional. Brief description of the parameter. Must not - // exceed 1024 characters. - Description string `json:"description,omitempty"` - - // Fields: Required. Paths to all fields that the parameter replaces. A - // field is allowed to appear in at most one parameter's list of field - // paths.A field path is similar in syntax to a - // google.protobuf.FieldMask. For example, a field path that references - // the zone field of a workflow template's cluster selector would be - // specified as placement.clusterSelector.zone.Also, field paths can - // reference fields using the following syntax: - // Values in maps can be referenced by - // key: - // labels'key' - // placement.clusterSelector.clusterLabels'key' - // placemen - // t.managedCluster.labels'key' - // placement.clusterSelector.clusterLabels'k - // ey' - // jobs'step-id'.labels'key' - // Jobs in the jobs list can be referenced by - // step-id: - // jobs'step-id'.hadoopJob.mainJarFileUri - // jobs'step-id'.hiveJob. - // queryFileUri - // jobs'step-id'.pySparkJob.mainPythonFileUri - // jobs'step-id'. - // hadoopJob.jarFileUris0 - // jobs'step-id'.hadoopJob.archiveUris0 - // jobs'step- - // id'.hadoopJob.fileUris0 - // jobs'step-id'.pySparkJob.pythonFileUris0 - // Items - // in repeated fields can be referenced by a zero-based - // index: - // jobs'step-id'.sparkJob.args0 - // Other - // examples: - // jobs'step-id'.hadoopJob.properties'key' - // jobs'step-id'.hadoop - // Job.args0 - // jobs'step-id'.hiveJob.scriptVariables'key' - // jobs'step-id'.had - // oopJob.mainJarFileUri - // placement.clusterSelector.zoneIt may not be possible to parameterize - // maps and repeated fields in their entirety since only individual map - // values and individual items in repeated fields can be referenced. For - // example, the following field paths are - // invalid: - // placement.clusterSelector.clusterLabels - // jobs'step-id'.sparkJo - // b.args - Fields []string `json:"fields,omitempty"` - - // Name: Required. Parameter name. The parameter name is used as the - // key, and paired with the parameter value, which are passed to the - // template when the template is instantiated. The name must contain - // only capital letters (A-Z), numbers (0-9), and underscores (_), and - // must not start with a number. The maximum length is 40 characters. - Name string `json:"name,omitempty"` - - // Validation: Optional. Validation rules to be applied to this - // parameter's value. - Validation *ParameterValidation `json:"validation,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TemplateParameter) MarshalJSON() ([]byte, error) { - type NoMethod TemplateParameter - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TestIamPermissionsRequest: Request message for TestIamPermissions -// method. -type TestIamPermissionsRequest struct { - // Permissions: The set of permissions to check for the resource. - // Permissions with wildcards (such as '*' or 'storage.*') are not - // allowed. For more information see IAM Overview - // (https://cloud.google.com/iam/docs/overview#permissions). - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") 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 *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TestIamPermissionsResponse: Response message for TestIamPermissions -// method. -type TestIamPermissionsResponse struct { - // Permissions: A subset of TestPermissionsRequest.permissions that the - // caller is allowed. - Permissions []string `json:"permissions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") 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 *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ValueValidation: Validation based on a list of allowed values. -type ValueValidation struct { - // Values: Required. List of allowed values for the parameter. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Values") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Values") 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 *ValueValidation) MarshalJSON() ([]byte, error) { - type NoMethod ValueValidation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // WorkflowGraph: The workflow graph. type WorkflowGraph struct { // Nodes: Output only. The workflow nodes. @@ -2726,9 +1956,6 @@ type WorkflowMetadata struct { // DeleteCluster: Output only. The delete cluster operation metadata. DeleteCluster *ClusterOperation `json:"deleteCluster,omitempty"` - // EndTime: Output only. Workflow end time. - EndTime string `json:"endTime,omitempty"` - // Graph: Output only. The workflow graph. Graph *WorkflowGraph `json:"graph,omitempty"` @@ -2736,9 +1963,6 @@ type WorkflowMetadata struct { // those parameters. Parameters map[string]string `json:"parameters,omitempty"` - // StartTime: Output only. Workflow start time. - StartTime string `json:"startTime,omitempty"` - // State: Output only. The workflow state. // // Possible values: @@ -2828,119 +2052,6 @@ func (s *WorkflowNode) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// WorkflowTemplate: A Cloud Dataproc workflow template resource. -type WorkflowTemplate struct { - // CreateTime: Output only. The time template was created. - CreateTime string `json:"createTime,omitempty"` - - // Id: Required. The template id.The id must contain only letters (a-z, - // A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin - // or end with underscore or hyphen. Must consist of between 3 and 50 - // characters. - Id string `json:"id,omitempty"` - - // Jobs: Required. The Directed Acyclic Graph of Jobs to submit. - Jobs []*OrderedJob `json:"jobs,omitempty"` - - // Labels: Optional. The labels to associate with this template. These - // labels will be propagated to all jobs and clusters created by the - // workflow instance.Label keys must contain 1 to 63 characters, and - // must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).Label - // values may be empty, but, if present, must contain 1 to 63 - // characters, and must conform to RFC 1035 - // (https://www.ietf.org/rfc/rfc1035.txt).No more than 32 labels can be - // associated with a template. - Labels map[string]string `json:"labels,omitempty"` - - // Name: Output only. The "resource name" of the template, as described - // in https://cloud.google.com/apis/design/resource_names of the form - // projects/{project_id}/regions/{region}/workflowTemplates/{template_id} - Name string `json:"name,omitempty"` - - // Parameters: Optional. Template parameters whose values are - // substituted into the template. Values for parameters must be provided - // when the template is instantiated. - Parameters []*TemplateParameter `json:"parameters,omitempty"` - - // Placement: Required. WorkflowTemplate scheduling information. - Placement *WorkflowTemplatePlacement `json:"placement,omitempty"` - - // UpdateTime: Output only. The time template was last updated. - UpdateTime string `json:"updateTime,omitempty"` - - // Version: Optional. Used to perform a consistent - // read-modify-write.This field should be left blank for a - // CreateWorkflowTemplate request. It is required for an - // UpdateWorkflowTemplate request, and must match the current server - // version. A typical update template flow would fetch the current - // template with a GetWorkflowTemplate request, which will return the - // current template with the version field filled in with the current - // server version. The user updates other fields in the template, then - // returns it as part of the UpdateWorkflowTemplate request. - Version int64 `json:"version,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *WorkflowTemplate) MarshalJSON() ([]byte, error) { - type NoMethod WorkflowTemplate - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// WorkflowTemplatePlacement: Specifies workflow execution target.Either -// managed_cluster or cluster_selector is required. -type WorkflowTemplatePlacement struct { - // ClusterSelector: Optional. A selector that chooses target cluster for - // jobs based on metadata.The selector is evaluated at the time each job - // is submitted. - ClusterSelector *ClusterSelector `json:"clusterSelector,omitempty"` - - // ManagedCluster: Optional. A cluster that is managed by the workflow. - ManagedCluster *ManagedCluster `json:"managedCluster,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClusterSelector") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClusterSelector") 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 *WorkflowTemplatePlacement) MarshalJSON() ([]byte, error) { - type NoMethod WorkflowTemplatePlacement - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // YarnApplication: A YARN application created by a job. Application // information is a subset of // org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto 1 && !(nCreds == 2 && ds.TokenSource != nil && ds.CredentialsFile != "") { + if ds.Credentials != nil && (ds.APIKey != "" || ds.TokenSource != nil || ds.CredentialsFile != "") { return errors.New("multiple credential options provided") } if ds.HTTPClient != nil && ds.GRPCConn != nil { @@ -76,6 +58,5 @@ func (ds *DialSettings) Validate() error { if ds.HTTPClient != nil && ds.GRPCDialOpts != nil { return errors.New("WithHTTPClient is incompatible with gRPC dial options") } - return nil } diff --git a/vendor/google.golang.org/api/iterator/iterator.go b/vendor/google.golang.org/api/iterator/iterator.go index 3c8ea773..e34e5207 100644 --- a/vendor/google.golang.org/api/iterator/iterator.go +++ b/vendor/google.golang.org/api/iterator/iterator.go @@ -1,4 +1,4 @@ -// Copyright 2016 Google LLC +// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/google.golang.org/api/logging/v2/logging-api.json b/vendor/google.golang.org/api/logging/v2/logging-api.json index 3fe40335..39ac66ea 100644 --- a/vendor/google.golang.org/api/logging/v2/logging-api.json +++ b/vendor/google.golang.org/api/logging/v2/logging-api.json @@ -499,7 +499,7 @@ "type": "boolean" }, "updateMask": { - "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -539,7 +539,7 @@ "type": "boolean" }, "updateMask": { - "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1150,7 +1150,7 @@ "type": "boolean" }, "updateMask": { - "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1190,7 +1190,7 @@ "type": "boolean" }, "updateMask": { - "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1698,7 +1698,7 @@ "type": "boolean" }, "updateMask": { - "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1738,7 +1738,7 @@ "type": "boolean" }, "updateMask": { - "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -2301,7 +2301,7 @@ "type": "boolean" }, "updateMask": { - "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -2341,7 +2341,7 @@ "type": "boolean" }, "updateMask": { - "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -2514,7 +2514,7 @@ "type": "boolean" }, "updateMask": { - "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -2535,7 +2535,7 @@ } } }, - "revision": "20181020", + "revision": "20180806", "rootUrl": "https://logging.googleapis.com/", "schemas": { "BucketOptions": { @@ -2971,10 +2971,6 @@ "trace": { "description": "Optional. Resource name of the trace associated with the log entry, if any. If it contains a relative resource name, the name is assumed to be relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824", "type": "string" - }, - "traceSampled": { - "description": "Optional. The sampling decision of the trace associated with the log entry. True means that the trace resource name in the trace field was sampled for storage in a trace backend. False means that the trace was not sampled for storage when this log entry was written, or the sampling decision was unknown at the time. A non-sampled trace value is still useful as a request correlation identifier. The default is False.", - "type": "boolean" } }, "type": "object" @@ -3100,7 +3096,7 @@ "description": "Optional. The bucket_options are required when the logs-based metric is using a DISTRIBUTION value type and it describes the bucket boundaries used to create a histogram of the extracted values." }, "description": { - "description": "Optional. A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters.", + "description": "Optional. A description of this metric, which is used in documentation.", "type": "string" }, "filter": { @@ -3149,6 +3145,11 @@ "description": "Required. The export destination:\n\"storage.googleapis.com/[GCS_BUCKET]\"\n\"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]\"\n\"pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]\"\nThe sink's writer_identity, set when the sink is created, must have permission to write to the destination or else the log entries are not exported. For more information, see Exporting Logs With Sinks.", "type": "string" }, + "endTime": { + "description": "Deprecated. This field is ignored when creating or updating sinks.", + "format": "google-datetime", + "type": "string" + }, "filter": { "description": "Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. For example:\nlogName=\"projects/[PROJECT_ID]/logs/[LOG_ID]\" AND severity\u003e=ERROR\n", "type": "string" @@ -3175,6 +3176,11 @@ ], "type": "string" }, + "startTime": { + "description": "Deprecated. This field is ignored when creating or updating sinks.", + "format": "google-datetime", + "type": "string" + }, "writerIdentity": { "description": "Output only. An IAM identity\u0026mdash;a service account or group\u0026mdash;under which Logging writes the exported log entries to the sink's destination. This field is set by sinks.create and sinks.update, based on the setting of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting access for a resource. Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity.", "type": "string" @@ -3577,7 +3583,7 @@ "type": "object" }, "logName": { - "description": "Optional. A default log resource name that is assigned to all log entries in entries that do not specify a value for log_name:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example:\n\"projects/my-project-id/logs/syslog\"\n\"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\"\nThe permission \u003ccode\u003elogging.logEntries.create\u003c/code\u003e is needed on each project, organization, billing account, or folder that is receiving new log entries, whether the resource is specified in \u003ccode\u003elogName\u003c/code\u003e or in an individual log entry.", + "description": "Optional. A default log resource name that is assigned to all log entries in entries that do not specify a value for log_name:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n\"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]\"\n\"folders/[FOLDER_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\" or \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.", "type": "string" }, "partialSuccess": { diff --git a/vendor/google.golang.org/api/logging/v2/logging-gen.go b/vendor/google.golang.org/api/logging/v2/logging-gen.go index f535dbeb..8b7e77fd 100644 --- a/vendor/google.golang.org/api/logging/v2/logging-gen.go +++ b/vendor/google.golang.org/api/logging/v2/logging-gen.go @@ -16,16 +16,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -1124,15 +1123,6 @@ type LogEntry struct { // projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824 Trace string `json:"trace,omitempty"` - // TraceSampled: Optional. The sampling decision of the trace associated - // with the log entry. True means that the trace resource name in the - // trace field was sampled for storage in a trace backend. False means - // that the trace was not sampled for storage when this log entry was - // written, or the sampling decision was unknown at the time. A - // non-sampled trace value is still useful as a request correlation - // identifier. The default is False. - TraceSampled bool `json:"traceSampled,omitempty"` - // ForceSendFields is a list of field names (e.g. "HttpRequest") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -1363,8 +1353,7 @@ type LogMetric struct { BucketOptions *BucketOptions `json:"bucketOptions,omitempty"` // Description: Optional. A description of this metric, which is used in - // documentation. The maximum length of the description is 8000 - // characters. + // documentation. Description string `json:"description,omitempty"` // Filter: Required. An advanced logs filter which is used to match log @@ -1489,6 +1478,10 @@ type LogSink struct { // not exported. For more information, see Exporting Logs With Sinks. Destination string `json:"destination,omitempty"` + // EndTime: Deprecated. This field is ignored when creating or updating + // sinks. + EndTime string `json:"endTime,omitempty"` + // Filter: Optional. An advanced logs filter. The only exported log // entries are those that are in the resource owning the sink and that // match the filter. For @@ -1533,6 +1526,10 @@ type LogSink struct { // "V1" - LogEntry version 1 format. OutputVersionFormat string `json:"outputVersionFormat,omitempty"` + // StartTime: Deprecated. This field is ignored when creating or + // updating sinks. + StartTime string `json:"startTime,omitempty"` + // WriterIdentity: Output only. An IAM identity—a service account // or group—under which Logging writes the exported log entries to // the sink's destination. This field is set by sinks.create and @@ -2225,15 +2222,10 @@ type WriteLogEntriesRequest struct { // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[ // LOG_ID]" // "folders/[FOLDER_ID]/logs/[LOG_ID]" - // [LOG_ID] must be URL-encoded. For - // example: - // "projects/my-project-id/logs/syslog" - // "organizations/123456789 - // 0/logs/cloudresourcemanager.googleapis.com%2Factivity" - // The permission logging.logEntries.create is needed on - // each project, organization, billing account, or folder that is - // receiving new log entries, whether the resource is specified in - // logName or in an individual log entry. + // [LOG_ID] must be URL-encoded. For example, + // "projects/my-project-id/logs/syslog" or + // "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Fa + // ctivity". For more information about log names, see LogEntry. LogName string `json:"logName,omitempty"` // PartialSuccess: Optional. Whether valid entries should be written @@ -2343,13 +2335,9 @@ func (c *BillingAccountsExclusionsCreateCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -2476,13 +2464,9 @@ func (c *BillingAccountsExclusionsDeleteCall) doRequest(alt string) (*http.Respo 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2620,13 +2604,9 @@ func (c *BillingAccountsExclusionsGetCall) 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2785,13 +2765,9 @@ func (c *BillingAccountsExclusionsListCall) 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, "v2/{+parent}/exclusions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -2968,13 +2944,9 @@ func (c *BillingAccountsExclusionsPatchCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3109,13 +3081,9 @@ func (c *BillingAccountsLogsDeleteCall) doRequest(alt string) (*http.Response, e 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, "v2/{+logName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "logName": c.logName, @@ -3273,13 +3241,9 @@ func (c *BillingAccountsLogsListCall) 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, "v2/{+parent}/logs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -3464,13 +3428,9 @@ func (c *BillingAccountsSinksCreateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -3603,13 +3563,9 @@ func (c *BillingAccountsSinksDeleteCall) doRequest(alt string) (*http.Response, 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, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkNameid, @@ -3747,13 +3703,9 @@ func (c *BillingAccountsSinksGetCall) 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, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkName, @@ -3912,13 +3864,9 @@ func (c *BillingAccountsSinksListCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -4072,7 +4020,7 @@ func (c *BillingAccountsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentit // compatibility purposes: destination,filter,includeChildren At some // point in the future, behavior will be removed and specifying an empty // updateMask will be an error.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: // updateMask=filter. func (c *BillingAccountsSinksPatchCall) UpdateMask(updateMask string) *BillingAccountsSinksPatchCall { c.urlParams_.Set("updateMask", updateMask) @@ -4117,13 +4065,9 @@ func (c *BillingAccountsSinksPatchCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkNameid, @@ -4190,7 +4134,7 @@ func (c *BillingAccountsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSi // "type": "boolean" // }, // "updateMask": { - // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -4257,7 +4201,7 @@ func (c *BillingAccountsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdenti // compatibility purposes: destination,filter,includeChildren At some // point in the future, behavior will be removed and specifying an empty // updateMask will be an error.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: // updateMask=filter. func (c *BillingAccountsSinksUpdateCall) UpdateMask(updateMask string) *BillingAccountsSinksUpdateCall { c.urlParams_.Set("updateMask", updateMask) @@ -4302,13 +4246,9 @@ func (c *BillingAccountsSinksUpdateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkNameid, @@ -4375,7 +4315,7 @@ func (c *BillingAccountsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogS // "type": "boolean" // }, // "updateMask": { - // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -4452,13 +4392,9 @@ func (c *EntriesListCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:list") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -4605,13 +4541,9 @@ func (c *EntriesWriteCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/entries:write") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -4735,13 +4667,9 @@ func (c *ExclusionsCreateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -4868,13 +4796,9 @@ func (c *ExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5012,13 +4936,9 @@ func (c *ExclusionsGetCall) 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5177,13 +5097,9 @@ func (c *ExclusionsListCall) 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, "v2/{+parent}/exclusions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -5360,13 +5276,9 @@ func (c *ExclusionsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5508,13 +5420,9 @@ func (c *FoldersExclusionsCreateCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -5641,13 +5549,9 @@ func (c *FoldersExclusionsDeleteCall) doRequest(alt string) (*http.Response, err 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5785,13 +5689,9 @@ func (c *FoldersExclusionsGetCall) 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5950,13 +5850,9 @@ func (c *FoldersExclusionsListCall) 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, "v2/{+parent}/exclusions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -6133,13 +6029,9 @@ func (c *FoldersExclusionsPatchCall) 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -6274,13 +6166,9 @@ func (c *FoldersLogsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "v2/{+logName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "logName": c.logName, @@ -6438,13 +6326,9 @@ func (c *FoldersLogsListCall) 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, "v2/{+parent}/logs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -6629,13 +6513,9 @@ func (c *FoldersSinksCreateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -6768,13 +6648,9 @@ func (c *FoldersSinksDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkNameid, @@ -6912,13 +6788,9 @@ func (c *FoldersSinksGetCall) 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, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkName, @@ -7077,13 +6949,9 @@ func (c *FoldersSinksListCall) 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, "v2/{+parent}/sinks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -7237,7 +7105,7 @@ func (c *FoldersSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) // compatibility purposes: destination,filter,includeChildren At some // point in the future, behavior will be removed and specifying an empty // updateMask will be an error.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: // updateMask=filter. func (c *FoldersSinksPatchCall) UpdateMask(updateMask string) *FoldersSinksPatchCall { c.urlParams_.Set("updateMask", updateMask) @@ -7282,13 +7150,9 @@ func (c *FoldersSinksPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkNameid, @@ -7355,7 +7219,7 @@ func (c *FoldersSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, erro // "type": "boolean" // }, // "updateMask": { - // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -7422,7 +7286,7 @@ func (c *FoldersSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) // compatibility purposes: destination,filter,includeChildren At some // point in the future, behavior will be removed and specifying an empty // updateMask will be an error.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: // updateMask=filter. func (c *FoldersSinksUpdateCall) UpdateMask(updateMask string) *FoldersSinksUpdateCall { c.urlParams_.Set("updateMask", updateMask) @@ -7467,13 +7331,9 @@ func (c *FoldersSinksUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkNameid, @@ -7540,7 +7400,7 @@ func (c *FoldersSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, err // "type": "boolean" // }, // "updateMask": { - // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -7613,13 +7473,9 @@ func (c *LogsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "v2/{+logName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "logName": c.logName, @@ -7777,13 +7633,9 @@ func (c *LogsListCall) 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, "v2/{+parent}/logs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -7973,13 +7825,9 @@ func (c *MonitoredResourceDescriptorsListCall) doRequest(alt string) (*http.Resp } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/monitoredResourceDescriptors") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -8136,13 +7984,9 @@ func (c *OrganizationsExclusionsCreateCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -8269,13 +8113,9 @@ func (c *OrganizationsExclusionsDeleteCall) doRequest(alt string) (*http.Respons 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -8413,13 +8253,9 @@ func (c *OrganizationsExclusionsGetCall) 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -8578,13 +8414,9 @@ func (c *OrganizationsExclusionsListCall) 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, "v2/{+parent}/exclusions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -8761,13 +8593,9 @@ func (c *OrganizationsExclusionsPatchCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -8902,13 +8730,9 @@ func (c *OrganizationsLogsDeleteCall) doRequest(alt string) (*http.Response, err 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, "v2/{+logName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "logName": c.logName, @@ -9066,13 +8890,9 @@ func (c *OrganizationsLogsListCall) 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, "v2/{+parent}/logs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -9257,13 +9077,9 @@ func (c *OrganizationsSinksCreateCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -9396,13 +9212,9 @@ func (c *OrganizationsSinksDeleteCall) doRequest(alt string) (*http.Response, er 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, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkNameid, @@ -9540,13 +9352,9 @@ func (c *OrganizationsSinksGetCall) 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, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkName, @@ -9705,13 +9513,9 @@ func (c *OrganizationsSinksListCall) doRequest(alt string) (*http.Response, erro } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -9865,7 +9669,7 @@ func (c *OrganizationsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity // compatibility purposes: destination,filter,includeChildren At some // point in the future, behavior will be removed and specifying an empty // updateMask will be an error.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: // updateMask=filter. func (c *OrganizationsSinksPatchCall) UpdateMask(updateMask string) *OrganizationsSinksPatchCall { c.urlParams_.Set("updateMask", updateMask) @@ -9910,13 +9714,9 @@ func (c *OrganizationsSinksPatchCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkNameid, @@ -9983,7 +9783,7 @@ func (c *OrganizationsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink // "type": "boolean" // }, // "updateMask": { - // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -10050,7 +9850,7 @@ func (c *OrganizationsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity // compatibility purposes: destination,filter,includeChildren At some // point in the future, behavior will be removed and specifying an empty // updateMask will be an error.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: // updateMask=filter. func (c *OrganizationsSinksUpdateCall) UpdateMask(updateMask string) *OrganizationsSinksUpdateCall { c.urlParams_.Set("updateMask", updateMask) @@ -10095,13 +9895,9 @@ func (c *OrganizationsSinksUpdateCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkNameid, @@ -10168,7 +9964,7 @@ func (c *OrganizationsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSin // "type": "boolean" // }, // "updateMask": { - // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -10248,13 +10044,9 @@ func (c *ProjectsExclusionsCreateCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -10381,13 +10173,9 @@ func (c *ProjectsExclusionsDeleteCall) doRequest(alt string) (*http.Response, er 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -10525,13 +10313,9 @@ func (c *ProjectsExclusionsGetCall) 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -10690,13 +10474,9 @@ func (c *ProjectsExclusionsListCall) doRequest(alt string) (*http.Response, erro } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -10873,13 +10653,9 @@ func (c *ProjectsExclusionsPatchCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -11014,13 +10790,9 @@ func (c *ProjectsLogsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "v2/{+logName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "logName": c.logName, @@ -11178,13 +10950,9 @@ func (c *ProjectsLogsListCall) 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, "v2/{+parent}/logs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -11349,13 +11117,9 @@ func (c *ProjectsMetricsCreateCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/metrics") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -11483,13 +11247,9 @@ func (c *ProjectsMetricsDeleteCall) doRequest(alt string) (*http.Response, error 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, "v2/{+metricName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "metricName": c.metricName, @@ -11628,13 +11388,9 @@ func (c *ProjectsMetricsGetCall) 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, "v2/{+metricName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "metricName": c.metricName, @@ -11793,13 +11549,9 @@ func (c *ProjectsMetricsListCall) 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, "v2/{+parent}/metrics") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -11964,13 +11716,9 @@ func (c *ProjectsMetricsUpdateCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+metricName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "metricName": c.metricName, @@ -12125,13 +11873,9 @@ func (c *ProjectsSinksCreateCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -12264,13 +12008,9 @@ func (c *ProjectsSinksDeleteCall) doRequest(alt string) (*http.Response, error) 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, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkNameid, @@ -12408,13 +12148,9 @@ func (c *ProjectsSinksGetCall) 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, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkName, @@ -12573,13 +12309,9 @@ func (c *ProjectsSinksListCall) 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, "v2/{+parent}/sinks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -12733,7 +12465,7 @@ func (c *ProjectsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) // compatibility purposes: destination,filter,includeChildren At some // point in the future, behavior will be removed and specifying an empty // updateMask will be an error.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: // updateMask=filter. func (c *ProjectsSinksPatchCall) UpdateMask(updateMask string) *ProjectsSinksPatchCall { c.urlParams_.Set("updateMask", updateMask) @@ -12778,13 +12510,9 @@ func (c *ProjectsSinksPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkNameid, @@ -12851,7 +12579,7 @@ func (c *ProjectsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, err // "type": "boolean" // }, // "updateMask": { - // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -12918,7 +12646,7 @@ func (c *ProjectsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool // compatibility purposes: destination,filter,includeChildren At some // point in the future, behavior will be removed and specifying an empty // updateMask will be an error.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: // updateMask=filter. func (c *ProjectsSinksUpdateCall) UpdateMask(updateMask string) *ProjectsSinksUpdateCall { c.urlParams_.Set("updateMask", updateMask) @@ -12963,13 +12691,9 @@ func (c *ProjectsSinksUpdateCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkNameid, @@ -13036,7 +12760,7 @@ func (c *ProjectsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, er // "type": "boolean" // }, // "updateMask": { - // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -13134,13 +12858,9 @@ func (c *SinksCreateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -13273,13 +12993,9 @@ func (c *SinksDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkNameid, @@ -13417,13 +13133,9 @@ func (c *SinksGetCall) 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, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkName, @@ -13582,13 +13294,9 @@ func (c *SinksListCall) 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, "v2/{+parent}/sinks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -13742,7 +13450,7 @@ func (c *SinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *Sinks // compatibility purposes: destination,filter,includeChildren At some // point in the future, behavior will be removed and specifying an empty // updateMask will be an error.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: // updateMask=filter. func (c *SinksUpdateCall) UpdateMask(updateMask string) *SinksUpdateCall { c.urlParams_.Set("updateMask", updateMask) @@ -13787,13 +13495,9 @@ func (c *SinksUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sinkName": c.sinkNameid, @@ -13860,7 +13564,7 @@ func (c *SinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) { // "type": "boolean" // }, // "updateMask": { - // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter.", + // "description": "Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter.", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/vendor/google.golang.org/api/monitoring/v3/monitoring-api.json b/vendor/google.golang.org/api/monitoring/v3/monitoring-api.json deleted file mode 100644 index e0e21e2e..00000000 --- a/vendor/google.golang.org/api/monitoring/v3/monitoring-api.json +++ /dev/null @@ -1,3704 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/monitoring": { - "description": "View and write monitoring data for all of your Google and third-party Cloud and API projects" - }, - "https://www.googleapis.com/auth/monitoring.read": { - "description": "View monitoring data for all of your Google Cloud and third-party projects" - }, - "https://www.googleapis.com/auth/monitoring.write": { - "description": "Publish metric data to your Google Cloud projects" - } - } - } - }, - "basePath": "", - "baseUrl": "https://monitoring.googleapis.com/", - "batchPath": "batch", - "canonicalName": "Monitoring", - "description": "Manages your Stackdriver Monitoring data and configurations. Most projects must be associated with a Stackdriver account, with a few exceptions as noted on the individual method pages.", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/monitoring/api/", - "fullyEncodeReservedExpansion": true, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "id": "monitoring:v3", - "kind": "discovery#restDescription", - "name": "monitoring", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "type": "string" - }, - "access_token": { - "description": "OAuth access token.", - "location": "query", - "type": "string" - }, - "alt": { - "default": "json", - "description": "Data format for response.", - "enum": [ - "json", - "media", - "proto" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "type": "string" - }, - "callback": { - "description": "JSONP", - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "location": "query", - "type": "string" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "description": "Returns response with indentations and line breaks.", - "location": "query", - "type": "boolean" - }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "location": "query", - "type": "string" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query", - "type": "string" - } - }, - "protocol": "rest", - "resources": { - "metricDescriptors": { - "methods": { - "create": { - "description": "Creates a new metric descriptor. User-created metric descriptors define custom metrics.", - "flatPath": "v3/{v3Id}/{v3Id1}/metricDescriptors", - "httpMethod": "POST", - "id": "monitoring.metricDescriptors.create", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "location": "path", - "pattern": "^[^/]+/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}/metricDescriptors", - "request": { - "$ref": "MetricDescriptor" - }, - "response": { - "$ref": "MetricDescriptor" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.write" - ] - }, - "delete": { - "description": "Deletes a metric descriptor. Only user-created custom metrics can be deleted.", - "flatPath": "v3/{v3Id}/{v3Id1}/metricDescriptors/{metricDescriptorsId}", - "httpMethod": "DELETE", - "id": "monitoring.metricDescriptors.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The metric descriptor on which to execute the request. The format is \"projects/{project_id_or_number}/metricDescriptors/{metric_id}\". An example of {metric_id} is: \"custom.googleapis.com/my_test_metric\".", - "location": "path", - "pattern": "^[^/]+/[^/]+/metricDescriptors/.+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "get": { - "description": "Gets a single metric descriptor. This method does not require a Stackdriver account.", - "flatPath": "v3/{v3Id}/{v3Id1}/metricDescriptors/{metricDescriptorsId}", - "httpMethod": "GET", - "id": "monitoring.metricDescriptors.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The metric descriptor on which to execute the request. The format is \"projects/{project_id_or_number}/metricDescriptors/{metric_id}\". An example value of {metric_id} is \"compute.googleapis.com/instance/disk/read_bytes_count\".", - "location": "path", - "pattern": "^[^/]+/[^/]+/metricDescriptors/.+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "MetricDescriptor" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read", - "https://www.googleapis.com/auth/monitoring.write" - ] - }, - "list": { - "description": "Lists metric descriptors that match a filter. This method does not require a Stackdriver account.", - "flatPath": "v3/{v3Id}/{v3Id1}/metricDescriptors", - "httpMethod": "GET", - "id": "monitoring.metricDescriptors.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "If this field is empty, all custom and system-defined metric descriptors are returned. Otherwise, the filter specifies which metric descriptors are to be returned. For example, the following filter matches all custom metrics:\nmetric.type = starts_with(\"custom.googleapis.com/\")\n", - "location": "query", - "type": "string" - }, - "name": { - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "location": "path", - "pattern": "^[^/]+/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "A positive number that is the maximum number of results to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}/metricDescriptors", - "response": { - "$ref": "ListMetricDescriptorsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read", - "https://www.googleapis.com/auth/monitoring.write" - ] - } - } - }, - "monitoredResourceDescriptors": { - "methods": { - "get": { - "description": "Gets a single monitored resource descriptor. This method does not require a Stackdriver account.", - "flatPath": "v3/{v3Id}/{v3Id1}/monitoredResourceDescriptors/{monitoredResourceDescriptorsId}", - "httpMethod": "GET", - "id": "monitoring.monitoredResourceDescriptors.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The monitored resource descriptor to get. The format is \"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}\". The {resource_type} is a predefined type, such as cloudsql_database.", - "location": "path", - "pattern": "^[^/]+/[^/]+/monitoredResourceDescriptors/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "MonitoredResourceDescriptor" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read", - "https://www.googleapis.com/auth/monitoring.write" - ] - }, - "list": { - "description": "Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.", - "flatPath": "v3/{v3Id}/{v3Id1}/monitoredResourceDescriptors", - "httpMethod": "GET", - "id": "monitoring.monitoredResourceDescriptors.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "An optional filter describing the descriptors to be returned. The filter can reference the descriptor's type and labels. For example, the following filter returns only Google Compute Engine descriptors that have an id label:\nresource.type = starts_with(\"gce_\") AND resource.label:id\n", - "location": "query", - "type": "string" - }, - "name": { - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "location": "path", - "pattern": "^[^/]+/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "A positive number that is the maximum number of results to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}/monitoredResourceDescriptors", - "response": { - "$ref": "ListMonitoredResourceDescriptorsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read", - "https://www.googleapis.com/auth/monitoring.write" - ] - } - } - }, - "projects": { - "resources": { - "alertPolicies": { - "methods": { - "create": { - "description": "Creates a new alerting policy.", - "flatPath": "v3/projects/{projectsId}/alertPolicies", - "httpMethod": "POST", - "id": "monitoring.projects.alertPolicies.create", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The project in which to create the alerting policy. The format is projects/[PROJECT_ID].Note that this field names the parent container in which the alerting policy will be written, not the name of the created policy. The alerting policy that is returned will have a name that contains a normalized representation of this name as a prefix but adds a suffix of the form /alertPolicies/[POLICY_ID], identifying the policy in the container.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}/alertPolicies", - "request": { - "$ref": "AlertPolicy" - }, - "response": { - "$ref": "AlertPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "delete": { - "description": "Deletes an alerting policy.", - "flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}", - "httpMethod": "DELETE", - "id": "monitoring.projects.alertPolicies.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The alerting policy to delete. The format is:\nprojects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]\nFor more information, see AlertPolicy.", - "location": "path", - "pattern": "^projects/[^/]+/alertPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "get": { - "description": "Gets a single alerting policy.", - "flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}", - "httpMethod": "GET", - "id": "monitoring.projects.alertPolicies.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The alerting policy to retrieve. The format is\nprojects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]\n", - "location": "path", - "pattern": "^projects/[^/]+/alertPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "AlertPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - }, - "list": { - "description": "Lists the existing alerting policies for the project.", - "flatPath": "v3/projects/{projectsId}/alertPolicies", - "httpMethod": "GET", - "id": "monitoring.projects.alertPolicies.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "If provided, this field specifies the criteria that must be met by alert policies to be included in the response.For more details, see sorting and filtering.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The project whose alert policies are to be listed. The format is\nprojects/[PROJECT_ID]\nNote that this field names the parent container in which the alerting policies to be listed are stored. To retrieve a single alerting policy by name, use the GetAlertPolicy operation, instead.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "A comma-separated list of fields by which to sort the result. Supports the same set of field references as the filter field. Entries can be prefixed with a minus sign to sort by the field in descending order.For more details, see sorting and filtering.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "The maximum number of results to return in a single response.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call.", - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}/alertPolicies", - "response": { - "$ref": "ListAlertPoliciesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - }, - "patch": { - "description": "Updates an alerting policy. You can either replace the entire policy with a new one or replace only certain fields in the current alerting policy by specifying the fields to be updated via updateMask. Returns the updated alerting policy.", - "flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}", - "httpMethod": "PATCH", - "id": "monitoring.projects.alertPolicies.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required if the policy exists. The resource name for this policy. The syntax is:\nprojects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]\n[ALERT_POLICY_ID] is assigned by Stackdriver Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request.", - "location": "path", - "pattern": "^projects/[^/]+/alertPolicies/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert_policy), or to the field's default value if the field is not in the supplied alerting policy. Fields not listed retain their previous value.Examples of valid field masks include display_name, documentation, documentation.content, documentation.mime_type, user_labels, user_label.nameofkey, enabled, conditions, combiner, etc.If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following:\nThe new policy will have the same [ALERT_POLICY_ID] as the former policy. This gives you continuity with the former policy in your notifications and incidents.\nConditions in the new policy will keep their former [CONDITION_ID] if the supplied condition includes the name field with that [CONDITION_ID]. If the supplied condition omits the name field, then a new [CONDITION_ID] is created.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}", - "request": { - "$ref": "AlertPolicy" - }, - "response": { - "$ref": "AlertPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - } - } - }, - "collectdTimeSeries": { - "methods": { - "create": { - "description": "Stackdriver Monitoring Agent only: Creates a new time series.\u003caside class=\"caution\"\u003eThis method is only for use by the Stackdriver Monitoring Agent. Use projects.timeSeries.create instead.\u003c/aside\u003e", - "flatPath": "v3/projects/{projectsId}/collectdTimeSeries", - "httpMethod": "POST", - "id": "monitoring.projects.collectdTimeSeries.create", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The project in which to create the time series. The format is \"projects/PROJECT_ID_OR_NUMBER\".", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}/collectdTimeSeries", - "request": { - "$ref": "CreateCollectdTimeSeriesRequest" - }, - "response": { - "$ref": "CreateCollectdTimeSeriesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.write" - ] - } - } - }, - "groups": { - "methods": { - "create": { - "description": "Creates a new group.", - "flatPath": "v3/projects/{projectsId}/groups", - "httpMethod": "POST", - "id": "monitoring.projects.groups.create", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The project in which to create the group. The format is \"projects/{project_id_or_number}\".", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - }, - "validateOnly": { - "description": "If true, validate this request but do not create the group.", - "location": "query", - "type": "boolean" - } - }, - "path": "v3/{+name}/groups", - "request": { - "$ref": "Group" - }, - "response": { - "$ref": "Group" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "delete": { - "description": "Deletes an existing group.", - "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", - "httpMethod": "DELETE", - "id": "monitoring.projects.groups.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The group to delete. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", - "location": "path", - "pattern": "^projects/[^/]+/groups/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "get": { - "description": "Gets a single group.", - "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", - "httpMethod": "GET", - "id": "monitoring.projects.groups.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The group to retrieve. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", - "location": "path", - "pattern": "^projects/[^/]+/groups/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "Group" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - }, - "list": { - "description": "Lists the existing groups.", - "flatPath": "v3/projects/{projectsId}/groups", - "httpMethod": "GET", - "id": "monitoring.projects.groups.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "ancestorsOfGroup": { - "description": "A group name: \"projects/{project_id_or_number}/groups/{group_id}\". Returns groups that are ancestors of the specified group. The groups are returned in order, starting with the immediate parent and ending with the most distant ancestor. If the specified group has no immediate parent, the results are empty.", - "location": "query", - "type": "string" - }, - "childrenOfGroup": { - "description": "A group name: \"projects/{project_id_or_number}/groups/{group_id}\". Returns groups whose parentName field contains the group name. If no groups have this parent, the results are empty.", - "location": "query", - "type": "string" - }, - "descendantsOfGroup": { - "description": "A group name: \"projects/{project_id_or_number}/groups/{group_id}\". Returns the descendants of the specified group. This is a superset of the results returned by the childrenOfGroup filter, and includes children-of-children, and so forth.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The project whose groups are to be listed. The format is \"projects/{project_id_or_number}\".", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "A positive number that is the maximum number of results to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}/groups", - "response": { - "$ref": "ListGroupsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - }, - "update": { - "description": "Updates an existing group. You can change any group attributes except name.", - "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", - "httpMethod": "PUT", - "id": "monitoring.projects.groups.update", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Output only. The name of this group. The format is \"projects/{project_id_or_number}/groups/{group_id}\". When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique {group_id} that is generated automatically.", - "location": "path", - "pattern": "^projects/[^/]+/groups/[^/]+$", - "required": true, - "type": "string" - }, - "validateOnly": { - "description": "If true, validate this request but do not update the existing group.", - "location": "query", - "type": "boolean" - } - }, - "path": "v3/{+name}", - "request": { - "$ref": "Group" - }, - "response": { - "$ref": "Group" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - } - }, - "resources": { - "members": { - "methods": { - "list": { - "description": "Lists the monitored resources that are members of a group.", - "flatPath": "v3/projects/{projectsId}/groups/{groupsId}/members", - "httpMethod": "GET", - "id": "monitoring.projects.groups.members.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "An optional list filter describing the members to be returned. The filter may reference the type, labels, and metadata of monitored resources that comprise the group. For example, to return only resources representing Compute Engine VM instances, use this filter:\nresource.type = \"gce_instance\"\n", - "location": "query", - "type": "string" - }, - "interval.endTime": { - "description": "Required. The end of the time interval.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "interval.startTime": { - "description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "name": { - "description": "The group whose members are listed. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", - "location": "path", - "pattern": "^projects/[^/]+/groups/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "A positive number that is the maximum number of results to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}/members", - "response": { - "$ref": "ListGroupMembersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - } - } - } - } - }, - "metricDescriptors": { - "methods": { - "create": { - "description": "Creates a new metric descriptor. User-created metric descriptors define custom metrics.", - "flatPath": "v3/projects/{projectsId}/metricDescriptors", - "httpMethod": "POST", - "id": "monitoring.projects.metricDescriptors.create", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}/metricDescriptors", - "request": { - "$ref": "MetricDescriptor" - }, - "response": { - "$ref": "MetricDescriptor" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.write" - ] - }, - "delete": { - "description": "Deletes a metric descriptor. Only user-created custom metrics can be deleted.", - "flatPath": "v3/projects/{projectsId}/metricDescriptors/{metricDescriptorsId}", - "httpMethod": "DELETE", - "id": "monitoring.projects.metricDescriptors.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The metric descriptor on which to execute the request. The format is \"projects/{project_id_or_number}/metricDescriptors/{metric_id}\". An example of {metric_id} is: \"custom.googleapis.com/my_test_metric\".", - "location": "path", - "pattern": "^projects/[^/]+/metricDescriptors/.+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "get": { - "description": "Gets a single metric descriptor. This method does not require a Stackdriver account.", - "flatPath": "v3/projects/{projectsId}/metricDescriptors/{metricDescriptorsId}", - "httpMethod": "GET", - "id": "monitoring.projects.metricDescriptors.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The metric descriptor on which to execute the request. The format is \"projects/{project_id_or_number}/metricDescriptors/{metric_id}\". An example value of {metric_id} is \"compute.googleapis.com/instance/disk/read_bytes_count\".", - "location": "path", - "pattern": "^projects/[^/]+/metricDescriptors/.+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "MetricDescriptor" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read", - "https://www.googleapis.com/auth/monitoring.write" - ] - }, - "list": { - "description": "Lists metric descriptors that match a filter. This method does not require a Stackdriver account.", - "flatPath": "v3/projects/{projectsId}/metricDescriptors", - "httpMethod": "GET", - "id": "monitoring.projects.metricDescriptors.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "If this field is empty, all custom and system-defined metric descriptors are returned. Otherwise, the filter specifies which metric descriptors are to be returned. For example, the following filter matches all custom metrics:\nmetric.type = starts_with(\"custom.googleapis.com/\")\n", - "location": "query", - "type": "string" - }, - "name": { - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "A positive number that is the maximum number of results to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}/metricDescriptors", - "response": { - "$ref": "ListMetricDescriptorsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read", - "https://www.googleapis.com/auth/monitoring.write" - ] - } - } - }, - "monitoredResourceDescriptors": { - "methods": { - "get": { - "description": "Gets a single monitored resource descriptor. This method does not require a Stackdriver account.", - "flatPath": "v3/projects/{projectsId}/monitoredResourceDescriptors/{monitoredResourceDescriptorsId}", - "httpMethod": "GET", - "id": "monitoring.projects.monitoredResourceDescriptors.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The monitored resource descriptor to get. The format is \"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}\". The {resource_type} is a predefined type, such as cloudsql_database.", - "location": "path", - "pattern": "^projects/[^/]+/monitoredResourceDescriptors/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "MonitoredResourceDescriptor" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read", - "https://www.googleapis.com/auth/monitoring.write" - ] - }, - "list": { - "description": "Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.", - "flatPath": "v3/projects/{projectsId}/monitoredResourceDescriptors", - "httpMethod": "GET", - "id": "monitoring.projects.monitoredResourceDescriptors.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "An optional filter describing the descriptors to be returned. The filter can reference the descriptor's type and labels. For example, the following filter returns only Google Compute Engine descriptors that have an id label:\nresource.type = starts_with(\"gce_\") AND resource.label:id\n", - "location": "query", - "type": "string" - }, - "name": { - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "A positive number that is the maximum number of results to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}/monitoredResourceDescriptors", - "response": { - "$ref": "ListMonitoredResourceDescriptorsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read", - "https://www.googleapis.com/auth/monitoring.write" - ] - } - } - }, - "notificationChannelDescriptors": { - "methods": { - "get": { - "description": "Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.", - "flatPath": "v3/projects/{projectsId}/notificationChannelDescriptors/{notificationChannelDescriptorsId}", - "httpMethod": "GET", - "id": "monitoring.projects.notificationChannelDescriptors.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The channel type for which to execute the request. The format is projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}.", - "location": "path", - "pattern": "^projects/[^/]+/notificationChannelDescriptors/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "NotificationChannelDescriptor" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - }, - "list": { - "description": "Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.", - "flatPath": "v3/projects/{projectsId}/notificationChannelDescriptors", - "httpMethod": "GET", - "id": "monitoring.projects.notificationChannelDescriptors.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is:\nprojects/[PROJECT_ID]\nNote that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the GetNotificationChannelDescriptor operation, instead.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be chosen by the service.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "If non-empty, page_token must contain a value returned as the next_page_token in a previous response to request the next set of results.", - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}/notificationChannelDescriptors", - "response": { - "$ref": "ListNotificationChannelDescriptorsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - } - } - }, - "notificationChannels": { - "methods": { - "create": { - "description": "Creates a new notification channel, representing a single notification endpoint such as an email address, SMS number, or PagerDuty service.", - "flatPath": "v3/projects/{projectsId}/notificationChannels", - "httpMethod": "POST", - "id": "monitoring.projects.notificationChannels.create", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The project on which to execute the request. The format is:\nprojects/[PROJECT_ID]\nNote that this names the container into which the channel will be written. This does not name the newly created channel. The resulting channel's name will have a normalized version of this field as a prefix, but will add /notificationChannels/[CHANNEL_ID] to identify the channel.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}/notificationChannels", - "request": { - "$ref": "NotificationChannel" - }, - "response": { - "$ref": "NotificationChannel" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "delete": { - "description": "Deletes a notification channel.", - "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}", - "httpMethod": "DELETE", - "id": "monitoring.projects.notificationChannels.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "force": { - "description": "If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.", - "location": "query", - "type": "boolean" - }, - "name": { - "description": "The channel for which to execute the request. The format is projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID].", - "location": "path", - "pattern": "^projects/[^/]+/notificationChannels/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "get": { - "description": "Gets a single notification channel. The channel includes the relevant configuration details with which the channel was created. However, the response may truncate or omit passwords, API keys, or other private key matter and thus the response may not be 100% identical to the information that was supplied in the call to the create method.", - "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}", - "httpMethod": "GET", - "id": "monitoring.projects.notificationChannels.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The channel for which to execute the request. The format is projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID].", - "location": "path", - "pattern": "^projects/[^/]+/notificationChannels/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "NotificationChannel" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - }, - "getVerificationCode": { - "description": "Requests a verification code for an already verified channel that can then be used in a call to VerifyNotificationChannel() on a different channel with an equivalent identity in the same or in a different project. This makes it possible to copy a channel between projects without requiring manual reverification of the channel. If the channel is not in the verified state, this method will fail (in other words, this may only be used if the SendNotificationChannelVerificationCode and VerifyNotificationChannel paths have already been used to put the given channel into the verified state).There is no guarantee that the verification codes returned by this method will be of a similar structure or form as the ones that are delivered to the channel via SendNotificationChannelVerificationCode; while VerifyNotificationChannel() will recognize both the codes delivered via SendNotificationChannelVerificationCode() and returned from GetNotificationChannelVerificationCode(), it is typically the case that the verification codes delivered via SendNotificationChannelVerificationCode() will be shorter and also have a shorter expiration (e.g. codes such as \"G-123456\") whereas GetVerificationCode() will typically return a much longer, websafe base 64 encoded string that has a longer expiration time.", - "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:getVerificationCode", - "httpMethod": "POST", - "id": "monitoring.projects.notificationChannels.getVerificationCode", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The notification channel for which a verification code is to be generated and retrieved. This must name a channel that is already verified; if the specified channel is not verified, the request will fail.", - "location": "path", - "pattern": "^projects/[^/]+/notificationChannels/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}:getVerificationCode", - "request": { - "$ref": "GetNotificationChannelVerificationCodeRequest" - }, - "response": { - "$ref": "GetNotificationChannelVerificationCodeResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "list": { - "description": "Lists the notification channels that have been created for the project.", - "flatPath": "v3/projects/{projectsId}/notificationChannels", - "httpMethod": "GET", - "id": "monitoring.projects.notificationChannels.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "If provided, this field specifies the criteria that must be met by notification channels to be included in the response.For more details, see sorting and filtering.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The project on which to execute the request. The format is projects/[PROJECT_ID]. That is, this names the container in which to look for the notification channels; it does not name a specific channel. To query a specific channel by REST resource name, use the GetNotificationChannel operation.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "A comma-separated list of fields by which to sort the result. Supports the same set of fields as in filter. Entries can be prefixed with a minus sign to sort in descending rather than ascending order.For more details, see sorting and filtering.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be chosen by the service.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "If non-empty, page_token must contain a value returned as the next_page_token in a previous response to request the next set of results.", - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}/notificationChannels", - "response": { - "$ref": "ListNotificationChannelsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - }, - "patch": { - "description": "Updates a notification channel. Fields not specified in the field mask remain unchanged.", - "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}", - "httpMethod": "PATCH", - "id": "monitoring.projects.notificationChannels.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The full REST resource name for this channel. The syntax is:\nprojects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]\nThe [CHANNEL_ID] is automatically assigned by the server on creation.", - "location": "path", - "pattern": "^projects/[^/]+/notificationChannels/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "The fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}", - "request": { - "$ref": "NotificationChannel" - }, - "response": { - "$ref": "NotificationChannel" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "sendVerificationCode": { - "description": "Causes a verification code to be delivered to the channel. The code can then be supplied in VerifyNotificationChannel to verify the channel.", - "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:sendVerificationCode", - "httpMethod": "POST", - "id": "monitoring.projects.notificationChannels.sendVerificationCode", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The notification channel to which to send a verification code.", - "location": "path", - "pattern": "^projects/[^/]+/notificationChannels/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}:sendVerificationCode", - "request": { - "$ref": "SendNotificationChannelVerificationCodeRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "verify": { - "description": "Verifies a NotificationChannel by proving receipt of the code delivered to the channel as a result of calling SendNotificationChannelVerificationCode.", - "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:verify", - "httpMethod": "POST", - "id": "monitoring.projects.notificationChannels.verify", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The notification channel to verify.", - "location": "path", - "pattern": "^projects/[^/]+/notificationChannels/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}:verify", - "request": { - "$ref": "VerifyNotificationChannelRequest" - }, - "response": { - "$ref": "NotificationChannel" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - } - } - }, - "timeSeries": { - "methods": { - "create": { - "description": "Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.", - "flatPath": "v3/projects/{projectsId}/timeSeries", - "httpMethod": "POST", - "id": "monitoring.projects.timeSeries.create", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}/timeSeries", - "request": { - "$ref": "CreateTimeSeriesRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.write" - ] - }, - "list": { - "description": "Lists time series that match a filter. This method does not require a Stackdriver account.", - "flatPath": "v3/projects/{projectsId}/timeSeries", - "httpMethod": "GET", - "id": "monitoring.projects.timeSeries.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "aggregation.alignmentPeriod": { - "description": "The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned.", - "format": "google-duration", - "location": "query", - "type": "string" - }, - "aggregation.crossSeriesReducer": { - "description": "The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.", - "enum": [ - "REDUCE_NONE", - "REDUCE_MEAN", - "REDUCE_MIN", - "REDUCE_MAX", - "REDUCE_SUM", - "REDUCE_STDDEV", - "REDUCE_COUNT", - "REDUCE_COUNT_TRUE", - "REDUCE_COUNT_FALSE", - "REDUCE_FRACTION_TRUE", - "REDUCE_PERCENTILE_99", - "REDUCE_PERCENTILE_95", - "REDUCE_PERCENTILE_50", - "REDUCE_PERCENTILE_05" - ], - "location": "query", - "type": "string" - }, - "aggregation.groupByFields": { - "description": "The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored.", - "location": "query", - "repeated": true, - "type": "string" - }, - "aggregation.perSeriesAligner": { - "description": "The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.", - "enum": [ - "ALIGN_NONE", - "ALIGN_DELTA", - "ALIGN_RATE", - "ALIGN_INTERPOLATE", - "ALIGN_NEXT_OLDER", - "ALIGN_MIN", - "ALIGN_MAX", - "ALIGN_MEAN", - "ALIGN_COUNT", - "ALIGN_SUM", - "ALIGN_STDDEV", - "ALIGN_COUNT_TRUE", - "ALIGN_COUNT_FALSE", - "ALIGN_FRACTION_TRUE", - "ALIGN_PERCENTILE_99", - "ALIGN_PERCENTILE_95", - "ALIGN_PERCENTILE_50", - "ALIGN_PERCENTILE_05", - "ALIGN_PERCENT_CHANGE" - ], - "location": "query", - "type": "string" - }, - "filter": { - "description": "A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example:\nmetric.type = \"compute.googleapis.com/instance/cpu/usage_time\" AND\n metric.label.instance_name = \"my-instance-name\"\n", - "location": "query", - "type": "string" - }, - "interval.endTime": { - "description": "Required. The end of the time interval.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "interval.startTime": { - "description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "name": { - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Unsupported: must be left blank. The points in each time series are returned in reverse time order.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "A positive number that is the maximum number of results to return. If page_size is empty or more than 100,000 results, the effective page_size is 100,000 results. If view is set to FULL, this is the maximum number of Points returned. If view is set to HEADERS, this is the maximum number of TimeSeries returned.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - "location": "query", - "type": "string" - }, - "view": { - "description": "Specifies which information is returned about the time series.", - "enum": [ - "FULL", - "HEADERS" - ], - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}/timeSeries", - "response": { - "$ref": "ListTimeSeriesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - } - } - }, - "uptimeCheckConfigs": { - "methods": { - "create": { - "description": "Creates a new uptime check configuration.", - "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs", - "httpMethod": "POST", - "id": "monitoring.projects.uptimeCheckConfigs.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The project in which to create the uptime check. The format is projects/[PROJECT_ID].", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+parent}/uptimeCheckConfigs", - "request": { - "$ref": "UptimeCheckConfig" - }, - "response": { - "$ref": "UptimeCheckConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "delete": { - "description": "Deletes an uptime check configuration. Note that this method will fail if the uptime check configuration is referenced by an alert policy or other dependent configs that would be rendered invalid by the deletion.", - "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs/{uptimeCheckConfigsId}", - "httpMethod": "DELETE", - "id": "monitoring.projects.uptimeCheckConfigs.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The uptime check configuration to delete. The format is projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].", - "location": "path", - "pattern": "^projects/[^/]+/uptimeCheckConfigs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - }, - "get": { - "description": "Gets a single uptime check configuration.", - "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs/{uptimeCheckConfigsId}", - "httpMethod": "GET", - "id": "monitoring.projects.uptimeCheckConfigs.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The uptime check configuration to retrieve. The format is projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].", - "location": "path", - "pattern": "^projects/[^/]+/uptimeCheckConfigs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}", - "response": { - "$ref": "UptimeCheckConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - }, - "list": { - "description": "Lists the existing valid uptime check configurations for the project, leaving out any invalid configurations.", - "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs", - "httpMethod": "GET", - "id": "monitoring.projects.uptimeCheckConfigs.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "The maximum number of results to return in a single response. The server may further constrain the maximum number of results returned in a single page. If the page_size is \u003c=0, the server will decide the number of results to be returned.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The project whose uptime check configurations are listed. The format is projects/[PROJECT_ID].", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+parent}/uptimeCheckConfigs", - "response": { - "$ref": "ListUptimeCheckConfigsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - }, - "patch": { - "description": "Updates an uptime check configuration. You can either replace the entire configuration with a new one or replace only certain fields in the current configuration by specifying the fields to be updated via \"updateMask\". Returns the updated configuration.", - "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs/{uptimeCheckConfigsId}", - "httpMethod": "PATCH", - "id": "monitoring.projects.uptimeCheckConfigs.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "A unique resource name for this UptimeCheckConfig. The format is:projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].This field should be omitted when creating the uptime check configuration; on create, the resource name is assigned by the server and included in the response.", - "location": "path", - "pattern": "^projects/[^/]+/uptimeCheckConfigs/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. If present, only the listed fields in the current uptime check configuration are updated with values from the new configuration. If this field is empty, then the current configuration is completely replaced with the new configuration.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}", - "request": { - "$ref": "UptimeCheckConfig" - }, - "response": { - "$ref": "UptimeCheckConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring" - ] - } - } - } - } - }, - "timeSeries": { - "methods": { - "create": { - "description": "Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.", - "flatPath": "v3/{v3Id}/{v3Id1}/timeSeries", - "httpMethod": "POST", - "id": "monitoring.timeSeries.create", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "location": "path", - "pattern": "^[^/]+/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v3/{+name}/timeSeries", - "request": { - "$ref": "CreateTimeSeriesRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.write" - ] - }, - "list": { - "description": "Lists time series that match a filter. This method does not require a Stackdriver account.", - "flatPath": "v3/{v3Id}/{v3Id1}/timeSeries", - "httpMethod": "GET", - "id": "monitoring.timeSeries.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "aggregation.alignmentPeriod": { - "description": "The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned.", - "format": "google-duration", - "location": "query", - "type": "string" - }, - "aggregation.crossSeriesReducer": { - "description": "The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.", - "enum": [ - "REDUCE_NONE", - "REDUCE_MEAN", - "REDUCE_MIN", - "REDUCE_MAX", - "REDUCE_SUM", - "REDUCE_STDDEV", - "REDUCE_COUNT", - "REDUCE_COUNT_TRUE", - "REDUCE_COUNT_FALSE", - "REDUCE_FRACTION_TRUE", - "REDUCE_PERCENTILE_99", - "REDUCE_PERCENTILE_95", - "REDUCE_PERCENTILE_50", - "REDUCE_PERCENTILE_05" - ], - "location": "query", - "type": "string" - }, - "aggregation.groupByFields": { - "description": "The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored.", - "location": "query", - "repeated": true, - "type": "string" - }, - "aggregation.perSeriesAligner": { - "description": "The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.", - "enum": [ - "ALIGN_NONE", - "ALIGN_DELTA", - "ALIGN_RATE", - "ALIGN_INTERPOLATE", - "ALIGN_NEXT_OLDER", - "ALIGN_MIN", - "ALIGN_MAX", - "ALIGN_MEAN", - "ALIGN_COUNT", - "ALIGN_SUM", - "ALIGN_STDDEV", - "ALIGN_COUNT_TRUE", - "ALIGN_COUNT_FALSE", - "ALIGN_FRACTION_TRUE", - "ALIGN_PERCENTILE_99", - "ALIGN_PERCENTILE_95", - "ALIGN_PERCENTILE_50", - "ALIGN_PERCENTILE_05", - "ALIGN_PERCENT_CHANGE" - ], - "location": "query", - "type": "string" - }, - "filter": { - "description": "A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example:\nmetric.type = \"compute.googleapis.com/instance/cpu/usage_time\" AND\n metric.label.instance_name = \"my-instance-name\"\n", - "location": "query", - "type": "string" - }, - "interval.endTime": { - "description": "Required. The end of the time interval.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "interval.startTime": { - "description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "name": { - "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - "location": "path", - "pattern": "^[^/]+/[^/]+$", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Unsupported: must be left blank. The points in each time series are returned in reverse time order.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "A positive number that is the maximum number of results to return. If page_size is empty or more than 100,000 results, the effective page_size is 100,000 results. If view is set to FULL, this is the maximum number of Points returned. If view is set to HEADERS, this is the maximum number of TimeSeries returned.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - "location": "query", - "type": "string" - }, - "view": { - "description": "Specifies which information is returned about the time series.", - "enum": [ - "FULL", - "HEADERS" - ], - "location": "query", - "type": "string" - } - }, - "path": "v3/{+name}/timeSeries", - "response": { - "$ref": "ListTimeSeriesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - } - } - }, - "uptimeCheckIps": { - "methods": { - "list": { - "description": "Returns the list of IPs that checkers run from", - "flatPath": "v3/uptimeCheckIps", - "httpMethod": "GET", - "id": "monitoring.uptimeCheckIps.list", - "parameterOrder": [], - "parameters": { - "pageSize": { - "description": "The maximum number of results to return in a single response. The server may further constrain the maximum number of results returned in a single page. If the page_size is \u003c=0, the server will decide the number of results to be returned. NOTE: this field is not yet implemented", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call. NOTE: this field is not yet implemented", - "location": "query", - "type": "string" - } - }, - "path": "v3/uptimeCheckIps", - "response": { - "$ref": "ListUptimeCheckIpsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/monitoring", - "https://www.googleapis.com/auth/monitoring.read" - ] - } - } - } - }, - "revision": "20181022", - "rootUrl": "https://monitoring.googleapis.com/", - "schemas": { - "Aggregation": { - "description": "Describes how to combine multiple time series to provide different views of the data. Aggregation consists of an alignment step on individual time series (alignment_period and per_series_aligner) followed by an optional reduction step of the data across the aligned time series (cross_series_reducer and group_by_fields). For more details, see Aggregation.", - "id": "Aggregation", - "properties": { - "alignmentPeriod": { - "description": "The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned.", - "format": "google-duration", - "type": "string" - }, - "crossSeriesReducer": { - "description": "The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.", - "enum": [ - "REDUCE_NONE", - "REDUCE_MEAN", - "REDUCE_MIN", - "REDUCE_MAX", - "REDUCE_SUM", - "REDUCE_STDDEV", - "REDUCE_COUNT", - "REDUCE_COUNT_TRUE", - "REDUCE_COUNT_FALSE", - "REDUCE_FRACTION_TRUE", - "REDUCE_PERCENTILE_99", - "REDUCE_PERCENTILE_95", - "REDUCE_PERCENTILE_50", - "REDUCE_PERCENTILE_05" - ], - "enumDescriptions": [ - "No cross-time series reduction. The output of the aligner is returned.", - "Reduce by computing the mean across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric or distribution values. The value type of the output is DOUBLE.", - "Reduce by computing the minimum across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric values. The value type of the output is the same as the value type of the input.", - "Reduce by computing the maximum across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric values. The value type of the output is the same as the value type of the input.", - "Reduce by computing the sum across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric and distribution values. The value type of the output is the same as the value type of the input.", - "Reduce by computing the standard deviation across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric or distribution values. The value type of the output is DOUBLE.", - "Reduce by computing the count of data points across time series for each alignment period. This reducer is valid for delta and gauge metrics of numeric, Boolean, distribution, and string value type. The value type of the output is INT64.", - "Reduce by computing the count of True-valued data points across time series for each alignment period. This reducer is valid for delta and gauge metrics of Boolean value type. The value type of the output is INT64.", - "Reduce by computing the count of False-valued data points across time series for each alignment period. This reducer is valid for delta and gauge metrics of Boolean value type. The value type of the output is INT64.", - "Reduce by computing the fraction of True-valued data points across time series for each alignment period. This reducer is valid for delta and gauge metrics of Boolean value type. The output value is in the range 0, 1 and has value type DOUBLE.", - "Reduce by computing 99th percentile of data points across time series for each alignment period. This reducer is valid for gauge and delta metrics of numeric and distribution type. The value of the output is DOUBLE", - "Reduce by computing 95th percentile of data points across time series for each alignment period. This reducer is valid for gauge and delta metrics of numeric and distribution type. The value of the output is DOUBLE", - "Reduce by computing 50th percentile of data points across time series for each alignment period. This reducer is valid for gauge and delta metrics of numeric and distribution type. The value of the output is DOUBLE", - "Reduce by computing 5th percentile of data points across time series for each alignment period. This reducer is valid for gauge and delta metrics of numeric and distribution type. The value of the output is DOUBLE" - ], - "type": "string" - }, - "groupByFields": { - "description": "The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored.", - "items": { - "type": "string" - }, - "type": "array" - }, - "perSeriesAligner": { - "description": "The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.", - "enum": [ - "ALIGN_NONE", - "ALIGN_DELTA", - "ALIGN_RATE", - "ALIGN_INTERPOLATE", - "ALIGN_NEXT_OLDER", - "ALIGN_MIN", - "ALIGN_MAX", - "ALIGN_MEAN", - "ALIGN_COUNT", - "ALIGN_SUM", - "ALIGN_STDDEV", - "ALIGN_COUNT_TRUE", - "ALIGN_COUNT_FALSE", - "ALIGN_FRACTION_TRUE", - "ALIGN_PERCENTILE_99", - "ALIGN_PERCENTILE_95", - "ALIGN_PERCENTILE_50", - "ALIGN_PERCENTILE_05", - "ALIGN_PERCENT_CHANGE" - ], - "enumDescriptions": [ - "No alignment. Raw data is returned. Not valid if cross-time series reduction is requested. The value type of the result is the same as the value type of the input.", - "Align and convert to delta metric type. This alignment is valid for cumulative metrics and delta metrics. Aligning an existing delta metric to a delta metric requires that the alignment period be increased. The value type of the result is the same as the value type of the input.One can think of this aligner as a rate but without time units; that is, the output is conceptually (second_point - first_point).", - "Align and convert to a rate. This alignment is valid for cumulative metrics and delta metrics with numeric values. The output is a gauge metric with value type DOUBLE.One can think of this aligner as conceptually providing the slope of the line that passes through the value at the start and end of the window. In other words, this is conceptually ((y1 - y0)/(t1 - t0)), and the output unit is one that has a \"/time\" dimension.If, by rate, you are looking for percentage change, see the ALIGN_PERCENT_CHANGE aligner option.", - "Align by interpolating between adjacent points around the period boundary. This alignment is valid for gauge metrics with numeric values. The value type of the result is the same as the value type of the input.", - "Align by shifting the oldest data point before the period boundary to the boundary. This alignment is valid for gauge metrics. The value type of the result is the same as the value type of the input.", - "Align time series via aggregation. The resulting data point in the alignment period is the minimum of all data points in the period. This alignment is valid for gauge and delta metrics with numeric values. The value type of the result is the same as the value type of the input.", - "Align time series via aggregation. The resulting data point in the alignment period is the maximum of all data points in the period. This alignment is valid for gauge and delta metrics with numeric values. The value type of the result is the same as the value type of the input.", - "Align time series via aggregation. The resulting data point in the alignment period is the average or arithmetic mean of all data points in the period. This alignment is valid for gauge and delta metrics with numeric values. The value type of the output is DOUBLE.", - "Align time series via aggregation. The resulting data point in the alignment period is the count of all data points in the period. This alignment is valid for gauge and delta metrics with numeric or Boolean values. The value type of the output is INT64.", - "Align time series via aggregation. The resulting data point in the alignment period is the sum of all data points in the period. This alignment is valid for gauge and delta metrics with numeric and distribution values. The value type of the output is the same as the value type of the input.", - "Align time series via aggregation. The resulting data point in the alignment period is the standard deviation of all data points in the period. This alignment is valid for gauge and delta metrics with numeric values. The value type of the output is DOUBLE.", - "Align time series via aggregation. The resulting data point in the alignment period is the count of True-valued data points in the period. This alignment is valid for gauge metrics with Boolean values. The value type of the output is INT64.", - "Align time series via aggregation. The resulting data point in the alignment period is the count of False-valued data points in the period. This alignment is valid for gauge metrics with Boolean values. The value type of the output is INT64.", - "Align time series via aggregation. The resulting data point in the alignment period is the fraction of True-valued data points in the period. This alignment is valid for gauge metrics with Boolean values. The output value is in the range 0, 1 and has value type DOUBLE.", - "Align time series via aggregation. The resulting data point in the alignment period is the 99th percentile of all data points in the period. This alignment is valid for gauge and delta metrics with distribution values. The output is a gauge metric with value type DOUBLE.", - "Align time series via aggregation. The resulting data point in the alignment period is the 95th percentile of all data points in the period. This alignment is valid for gauge and delta metrics with distribution values. The output is a gauge metric with value type DOUBLE.", - "Align time series via aggregation. The resulting data point in the alignment period is the 50th percentile of all data points in the period. This alignment is valid for gauge and delta metrics with distribution values. The output is a gauge metric with value type DOUBLE.", - "Align time series via aggregation. The resulting data point in the alignment period is the 5th percentile of all data points in the period. This alignment is valid for gauge and delta metrics with distribution values. The output is a gauge metric with value type DOUBLE.", - "Align and convert to a percentage change. This alignment is valid for gauge and delta metrics with numeric values. This alignment conceptually computes the equivalent of \"((current - previous)/previous)*100\" where previous value is determined based on the alignmentPeriod. In the event that previous is 0 the calculated value is infinity with the exception that if both (current - previous) and previous are 0 the calculated value is 0. A 10 minute moving mean is computed at each point of the time window prior to the above calculation to smooth the metric and prevent false positives from very short lived spikes. Only applicable for data that is \u003e= 0. Any values \u003c 0 are treated as no data. While delta metrics are accepted by this alignment special care should be taken that the values for the metric will always be positive. The output is a gauge metric with value type DOUBLE." - ], - "type": "string" - } - }, - "type": "object" - }, - "AlertPolicy": { - "description": "A description of the conditions under which some aspect of your system is considered to be \"unhealthy\" and the ways to notify people or services about this state. For an overview of alert policies, see Introduction to Alerting.", - "id": "AlertPolicy", - "properties": { - "combiner": { - "description": "How to combine the results of multiple conditions to determine if an incident should be opened.", - "enum": [ - "COMBINE_UNSPECIFIED", - "AND", - "OR", - "AND_WITH_MATCHING_RESOURCE" - ], - "enumDescriptions": [ - "An unspecified combiner.", - "Combine conditions using the logical AND operator. An incident is created only if all conditions are met simultaneously. This combiner is satisfied if all conditions are met, even if they are met on completely different resources.", - "Combine conditions using the logical OR operator. An incident is created if any of the listed conditions is met.", - "Combine conditions using logical AND operator, but unlike the regular AND option, an incident is created only if all conditions are met simultaneously on at least one resource." - ], - "type": "string" - }, - "conditions": { - "description": "A list of conditions for the policy. The conditions are combined by AND or OR according to the combiner field. If the combined conditions evaluate to true, then an incident is created. A policy can have from one to six conditions.", - "items": { - "$ref": "Condition" - }, - "type": "array" - }, - "creationRecord": { - "$ref": "MutationRecord", - "description": "A read-only record of the creation of the alerting policy. If provided in a call to create or update, this field will be ignored." - }, - "displayName": { - "description": "A short name or phrase used to identify the policy in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple policies in the same project. The name is limited to 512 Unicode characters.", - "type": "string" - }, - "documentation": { - "$ref": "Documentation", - "description": "Documentation that is included with notifications and incidents related to this policy. Best practice is for the documentation to include information to help responders understand, mitigate, escalate, and correct the underlying problems detected by the alerting policy. Notification channels that have limited capacity might not show this documentation." - }, - "enabled": { - "description": "Whether or not the policy is enabled. On write, the default interpretation if unset is that the policy is enabled. On read, clients should not make any assumption about the state if it has not been populated. The field should always be populated on List and Get operations, unless a field projection has been specified that strips it out.", - "type": "boolean" - }, - "mutationRecord": { - "$ref": "MutationRecord", - "description": "A read-only record of the most recent change to the alerting policy. If provided in a call to create or update, this field will be ignored." - }, - "name": { - "description": "Required if the policy exists. The resource name for this policy. The syntax is:\nprojects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]\n[ALERT_POLICY_ID] is assigned by Stackdriver Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request.", - "type": "string" - }, - "notificationChannels": { - "description": "Identifies the notification channels to which notifications should be sent when incidents are opened or closed or when new violations occur on an already opened incident. Each element of this array corresponds to the name field in each of the NotificationChannel objects that are returned from the ListNotificationChannels method. The syntax of the entries in this field is:\nprojects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]\n", - "items": { - "type": "string" - }, - "type": "array" - }, - "userLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.", - "type": "object" - } - }, - "type": "object" - }, - "BasicAuthentication": { - "description": "A type of authentication to perform against the specified resource or URL that uses username and password. Currently, only Basic authentication is supported in Uptime Monitoring.", - "id": "BasicAuthentication", - "properties": { - "password": { - "description": "The password to authenticate.", - "type": "string" - }, - "username": { - "description": "The username to authenticate.", - "type": "string" - } - }, - "type": "object" - }, - "BucketOptions": { - "description": "BucketOptions describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. BucketOptions does not include the number of values in each bucket.A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. The sequence of N buckets for a distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i \u003e 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite.", - "id": "BucketOptions", - "properties": { - "explicitBuckets": { - "$ref": "Explicit", - "description": "The explicit buckets." - }, - "exponentialBuckets": { - "$ref": "Exponential", - "description": "The exponential buckets." - }, - "linearBuckets": { - "$ref": "Linear", - "description": "The linear bucket." - } - }, - "type": "object" - }, - "CollectdPayload": { - "description": "A collection of data points sent from a collectd-based plugin. See the collectd documentation for more information.", - "id": "CollectdPayload", - "properties": { - "endTime": { - "description": "The end time of the interval.", - "format": "google-datetime", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "$ref": "TypedValue" - }, - "description": "The measurement metadata. Example: \"process_id\" -\u003e 12345", - "type": "object" - }, - "plugin": { - "description": "The name of the plugin. Example: \"disk\".", - "type": "string" - }, - "pluginInstance": { - "description": "The instance name of the plugin Example: \"hdcl\".", - "type": "string" - }, - "startTime": { - "description": "The start time of the interval.", - "format": "google-datetime", - "type": "string" - }, - "type": { - "description": "The measurement type. Example: \"memory\".", - "type": "string" - }, - "typeInstance": { - "description": "The measurement type instance. Example: \"used\".", - "type": "string" - }, - "values": { - "description": "The measured values during this time interval. Each value must have a different dataSourceName.", - "items": { - "$ref": "CollectdValue" - }, - "type": "array" - } - }, - "type": "object" - }, - "CollectdPayloadError": { - "description": "Describes the error status for payloads that were not written.", - "id": "CollectdPayloadError", - "properties": { - "error": { - "$ref": "Status", - "description": "Records the error status for the payload. If this field is present, the partial errors for nested values won't be populated." - }, - "index": { - "description": "The zero-based index in CreateCollectdTimeSeriesRequest.collectd_payloads.", - "format": "int32", - "type": "integer" - }, - "valueErrors": { - "description": "Records the error status for values that were not written due to an error.Failed payloads for which nothing is written will not include partial value errors.", - "items": { - "$ref": "CollectdValueError" - }, - "type": "array" - } - }, - "type": "object" - }, - "CollectdValue": { - "description": "A single data point from a collectd-based plugin.", - "id": "CollectdValue", - "properties": { - "dataSourceName": { - "description": "The data source for the collectd value. For example there are two data sources for network measurements: \"rx\" and \"tx\".", - "type": "string" - }, - "dataSourceType": { - "description": "The type of measurement.", - "enum": [ - "UNSPECIFIED_DATA_SOURCE_TYPE", - "GAUGE", - "COUNTER", - "DERIVE", - "ABSOLUTE" - ], - "enumDescriptions": [ - "An unspecified data source type. This corresponds to google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.", - "An instantaneous measurement of a varying quantity. This corresponds to google.api.MetricDescriptor.MetricKind.GAUGE.", - "A cumulative value over time. This corresponds to google.api.MetricDescriptor.MetricKind.CUMULATIVE.", - "A rate of change of the measurement.", - "An amount of change since the last measurement interval. This corresponds to google.api.MetricDescriptor.MetricKind.DELTA." - ], - "type": "string" - }, - "value": { - "$ref": "TypedValue", - "description": "The measurement value." - } - }, - "type": "object" - }, - "CollectdValueError": { - "description": "Describes the error status for values that were not written.", - "id": "CollectdValueError", - "properties": { - "error": { - "$ref": "Status", - "description": "Records the error status for the value." - }, - "index": { - "description": "The zero-based index in CollectdPayload.values within the parent CreateCollectdTimeSeriesRequest.collectd_payloads.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "Condition": { - "description": "A condition is a true/false test that determines when an alerting policy should open an incident. If a condition evaluates to true, it signifies that something is wrong.", - "id": "Condition", - "properties": { - "conditionAbsent": { - "$ref": "MetricAbsence", - "description": "A condition that checks that a time series continues to receive new data points." - }, - "conditionThreshold": { - "$ref": "MetricThreshold", - "description": "A condition that compares a time series against a threshold." - }, - "displayName": { - "description": "A short name or phrase used to identify the condition in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple conditions in the same policy.", - "type": "string" - }, - "name": { - "description": "Required if the condition exists. The unique resource name for this condition. Its syntax is:\nprojects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]\n[CONDITION_ID] is assigned by Stackdriver Monitoring when the condition is created as part of a new or updated alerting policy.When calling the alertPolicies.create method, do not include the name field in the conditions of the requested alerting policy. Stackdriver Monitoring creates the condition identifiers and includes them in the new policy.When calling the alertPolicies.update method to update a policy, including a condition name causes the existing condition to be updated. Conditions without names are added to the updated policy. Existing conditions are deleted if they are not updated.Best practice is to preserve [CONDITION_ID] if you make only small changes, such as those to condition thresholds, durations, or trigger values. Otherwise, treat the change as a new condition and let the existing condition be deleted.", - "type": "string" - } - }, - "type": "object" - }, - "ContentMatcher": { - "description": "Used to perform string matching. It allows substring and regular expressions, together with their negations.", - "id": "ContentMatcher", - "properties": { - "content": { - "description": "String or regex content to match (max 1024 bytes)", - "type": "string" - } - }, - "type": "object" - }, - "CreateCollectdTimeSeriesRequest": { - "description": "The CreateCollectdTimeSeries request.", - "id": "CreateCollectdTimeSeriesRequest", - "properties": { - "collectdPayloads": { - "description": "The collectd payloads representing the time series data. You must not include more than a single point for each time series, so no two payloads can have the same values for all of the fields plugin, plugin_instance, type, and type_instance.", - "items": { - "$ref": "CollectdPayload" - }, - "type": "array" - }, - "collectdVersion": { - "description": "The version of collectd that collected the data. Example: \"5.3.0-192.el6\".", - "type": "string" - }, - "resource": { - "$ref": "MonitoredResource", - "description": "The monitored resource associated with the time series." - } - }, - "type": "object" - }, - "CreateCollectdTimeSeriesResponse": { - "description": "The CreateCollectdTimeSeries response.", - "id": "CreateCollectdTimeSeriesResponse", - "properties": { - "payloadErrors": { - "description": "Records the error status for points that were not written due to an error.Failed requests for which nothing is written will return an error response instead.", - "items": { - "$ref": "CollectdPayloadError" - }, - "type": "array" - } - }, - "type": "object" - }, - "CreateTimeSeriesRequest": { - "description": "The CreateTimeSeries request.", - "id": "CreateTimeSeriesRequest", - "properties": { - "timeSeries": { - "description": "The new data to be added to a list of time series. Adds at most one data point to each of several time series. The new data point must be more recent than any other point in its time series. Each TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.", - "items": { - "$ref": "TimeSeries" - }, - "type": "array" - } - }, - "type": "object" - }, - "Distribution": { - "description": "Distribution contains summary statistics for a population of values. It optionally contains a histogram representing the distribution of those values across a set of buckets.The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values. The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by formulas for buckets of fixed or exponentially increasing widths.Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the mean and sum_of_squared_deviation fields meaningless.", - "id": "Distribution", - "properties": { - "bucketCounts": { - "description": "Required in the Stackdriver Monitoring API v3. The values for each bucket specified in bucket_options. The sum of the values in bucketCounts must equal the value in the count field of the Distribution object. The order of the bucket counts follows the numbering schemes described for the three bucket types. The underflow bucket has number 0; the finite buckets, if any, have numbers 1 through N-2; and the overflow bucket has number N-1. The size of bucket_counts must not be greater than N. If the size is less than N, then the remaining buckets are assigned values of zero.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "bucketOptions": { - "$ref": "BucketOptions", - "description": "Required in the Stackdriver Monitoring API v3. Defines the histogram bucket boundaries." - }, - "count": { - "description": "The number of values in the population. Must be non-negative. This value must equal the sum of the values in bucket_counts if a histogram is provided.", - "format": "int64", - "type": "string" - }, - "exemplars": { - "description": "Must be in increasing order of value field.", - "items": { - "$ref": "Exemplar" - }, - "type": "array" - }, - "mean": { - "description": "The arithmetic mean of the values in the population. If count is zero then this field must be zero.", - "format": "double", - "type": "number" - }, - "range": { - "$ref": "Range", - "description": "If specified, contains the range of the population values. The field must not be present if the count is zero. This field is presently ignored by the Stackdriver Monitoring API v3." - }, - "sumOfSquaredDeviation": { - "description": "The sum of squared deviations from the mean of the values in the population. For values x_i this is:\nSum[i=1..n]((x_i - mean)^2)\nKnuth, \"The Art of Computer Programming\", Vol. 2, page 323, 3rd edition describes Welford's method for accumulating this sum in one pass.If count is zero then this field must be zero.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "Documentation": { - "description": "A content string and a MIME type that describes the content string's format.", - "id": "Documentation", - "properties": { - "content": { - "description": "The text of the documentation, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller.", - "type": "string" - }, - "mimeType": { - "description": "The format of the content field. Presently, only the value \"text/markdown\" is supported. See Markdown (https://en.wikipedia.org/wiki/Markdown) for more information.", - "type": "string" - } - }, - "type": "object" - }, - "DroppedLabels": { - "description": "A set of (label, value) pairs which were dropped during aggregation, attached to google.api.Distribution.Exemplars in google.api.Distribution values during aggregation.These values are used in combination with the label values that remain on the aggregated Distribution timeseries to construct the full label set for the exemplar values. The resulting full label set may be used to identify the specific task/job/instance (for example) which may be contributing to a long-tail, while allowing the storage savings of only storing aggregated distribution values for a large group.Note that there are no guarantees on ordering of the labels from exemplar-to-exemplar and from distribution-to-distribution in the same stream, and there may be duplicates. It is up to clients to resolve any ambiguities.", - "id": "DroppedLabels", - "properties": { - "label": { - "additionalProperties": { - "type": "string" - }, - "description": "Map from label to its value, for all labels dropped in any aggregation.", - "type": "object" - } - }, - "type": "object" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", - "id": "Empty", - "properties": {}, - "type": "object" - }, - "Exemplar": { - "description": "Exemplars are example points that may be used to annotate aggregated distribution values. They are metadata that gives information about a particular value added to a Distribution bucket, such as a trace ID that was active when a value was added. They may contain further information, such as a example values and timestamps, origin, etc.", - "id": "Exemplar", - "properties": { - "attachments": { - "description": "Contextual information about the example value. Examples are:Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.TraceLiteral string: type.googleapis.com/google.protobuf.StringValueLabels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabelsThere may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "timestamp": { - "description": "The observation (sampling) time of the above value.", - "format": "google-datetime", - "type": "string" - }, - "value": { - "description": "Value of the exemplar point. This value determines to which bucket the exemplar belongs.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "Explicit": { - "description": "Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 \u003c= i \u003c N-1): boundsi Lower bound (1 \u003c= i \u003c N); boundsi - 1The bounds field must contain at least one element. If bounds has only one element, then there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets.", - "id": "Explicit", - "properties": { - "bounds": { - "description": "The values must be monotonically increasing.", - "items": { - "format": "double", - "type": "number" - }, - "type": "array" - } - }, - "type": "object" - }, - "Exponential": { - "description": "Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 \u003c= i \u003c N-1): scale * (growth_factor ^ i). Lower bound (1 \u003c= i \u003c N): scale * (growth_factor ^ (i - 1)).", - "id": "Exponential", - "properties": { - "growthFactor": { - "description": "Must be greater than 1.", - "format": "double", - "type": "number" - }, - "numFiniteBuckets": { - "description": "Must be greater than 0.", - "format": "int32", - "type": "integer" - }, - "scale": { - "description": "Must be greater than 0.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "Field": { - "description": "A single field of a message type.", - "id": "Field", - "properties": { - "cardinality": { - "description": "The field cardinality.", - "enum": [ - "CARDINALITY_UNKNOWN", - "CARDINALITY_OPTIONAL", - "CARDINALITY_REQUIRED", - "CARDINALITY_REPEATED" - ], - "enumDescriptions": [ - "For fields with unknown cardinality.", - "For optional fields.", - "For required fields. Proto2 syntax only.", - "For repeated fields." - ], - "type": "string" - }, - "defaultValue": { - "description": "The string value of the default value of this field. Proto2 syntax only.", - "type": "string" - }, - "jsonName": { - "description": "The field JSON name.", - "type": "string" - }, - "kind": { - "description": "The field type.", - "enum": [ - "TYPE_UNKNOWN", - "TYPE_DOUBLE", - "TYPE_FLOAT", - "TYPE_INT64", - "TYPE_UINT64", - "TYPE_INT32", - "TYPE_FIXED64", - "TYPE_FIXED32", - "TYPE_BOOL", - "TYPE_STRING", - "TYPE_GROUP", - "TYPE_MESSAGE", - "TYPE_BYTES", - "TYPE_UINT32", - "TYPE_ENUM", - "TYPE_SFIXED32", - "TYPE_SFIXED64", - "TYPE_SINT32", - "TYPE_SINT64" - ], - "enumDescriptions": [ - "Field type unknown.", - "Field type double.", - "Field type float.", - "Field type int64.", - "Field type uint64.", - "Field type int32.", - "Field type fixed64.", - "Field type fixed32.", - "Field type bool.", - "Field type string.", - "Field type group. Proto2 syntax only, and deprecated.", - "Field type message.", - "Field type bytes.", - "Field type uint32.", - "Field type enum.", - "Field type sfixed32.", - "Field type sfixed64.", - "Field type sint32.", - "Field type sint64." - ], - "type": "string" - }, - "name": { - "description": "The field name.", - "type": "string" - }, - "number": { - "description": "The field number.", - "format": "int32", - "type": "integer" - }, - "oneofIndex": { - "description": "The index of the field type in Type.oneofs, for message or enumeration types. The first type has index 1; zero means the type is not in the list.", - "format": "int32", - "type": "integer" - }, - "options": { - "description": "The protocol buffer options.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, - "packed": { - "description": "Whether to use alternative packed wire representation.", - "type": "boolean" - }, - "typeUrl": { - "description": "The field type URL, without the scheme, for message or enumeration types. Example: \"type.googleapis.com/google.protobuf.Timestamp\".", - "type": "string" - } - }, - "type": "object" - }, - "GetNotificationChannelVerificationCodeRequest": { - "description": "The GetNotificationChannelVerificationCode request.", - "id": "GetNotificationChannelVerificationCodeRequest", - "properties": { - "expireTime": { - "description": "The desired expiration time. If specified, the API will guarantee that the returned code will not be valid after the specified timestamp; however, the API cannot guarantee that the returned code will be valid for at least as long as the requested time (the API puts an upper bound on the amount of time for which a code may be valid). If omitted, a default expiration will be used, which may be less than the max permissible expiration (so specifying an expiration may extend the code's lifetime over omitting an expiration, even though the API does impose an upper limit on the maximum expiration that is permitted).", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GetNotificationChannelVerificationCodeResponse": { - "description": "The GetNotificationChannelVerificationCode request.", - "id": "GetNotificationChannelVerificationCodeResponse", - "properties": { - "code": { - "description": "The verification code, which may be used to verify other channels that have an equivalent identity (i.e. other channels of the same type with the same fingerprint such as other email channels with the same email address or other sms channels with the same number).", - "type": "string" - }, - "expireTime": { - "description": "The expiration time associated with the code that was returned. If an expiration was provided in the request, this is the minimum of the requested expiration in the request and the max permitted expiration.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "Group": { - "description": "The description of a dynamic collection of monitored resources. Each group has a filter that is matched against monitored resources and their associated metadata. If a group's filter matches an available monitored resource, then that resource is a member of that group. Groups can contain any number of monitored resources, and each monitored resource can be a member of any number of groups.Groups can be nested in parent-child hierarchies. The parentName field identifies an optional parent for each group. If a group has a parent, then the only monitored resources available to be matched by the group's filter are the resources contained in the parent group. In other words, a group contains the monitored resources that match its filter and the filters of all the group's ancestors. A group without a parent can contain any monitored resource.For example, consider an infrastructure running a set of instances with two user-defined tags: \"environment\" and \"role\". A parent group has a filter, environment=\"production\". A child of that parent group has a filter, role=\"transcoder\". The parent group contains all instances in the production environment, regardless of their roles. The child group contains instances that have the transcoder role and are in the production environment.The monitored resources contained in a group can change at any moment, depending on what resources exist and what filters are associated with the group and its ancestors.", - "id": "Group", - "properties": { - "displayName": { - "description": "A user-assigned name for this group, used only for display purposes.", - "type": "string" - }, - "filter": { - "description": "The filter used to determine which monitored resources belong to this group.", - "type": "string" - }, - "isCluster": { - "description": "If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters.", - "type": "boolean" - }, - "name": { - "description": "Output only. The name of this group. The format is \"projects/{project_id_or_number}/groups/{group_id}\". When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique {group_id} that is generated automatically.", - "type": "string" - }, - "parentName": { - "description": "The name of the group's parent, if it has one. The format is \"projects/{project_id_or_number}/groups/{group_id}\". For groups with no parent, parentName is the empty string, \"\".", - "type": "string" - } - }, - "type": "object" - }, - "HttpCheck": { - "description": "Information involved in an HTTP/HTTPS uptime check request.", - "id": "HttpCheck", - "properties": { - "authInfo": { - "$ref": "BasicAuthentication", - "description": "The authentication information. Optional when creating an HTTP check; defaults to empty." - }, - "headers": { - "additionalProperties": { - "type": "string" - }, - "description": "The list of headers to send as part of the uptime check request. If two headers have the same key and different values, they should be entered as a single header, with the value being a comma-separated list of all the desired values as described at https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). Entering two separate headers with the same key in a Create call will cause the first to be overwritten by the second. The maximum number of headers allowed is 100.", - "type": "object" - }, - "maskHeaders": { - "description": "Boolean specifiying whether to encrypt the header information. Encryption should be specified for any headers related to authentication that you do not wish to be seen when retrieving the configuration. The server will be responsible for encrypting the headers. On Get/List calls, if mask_headers is set to True then the headers will be obscured with ******.", - "type": "boolean" - }, - "path": { - "description": "The path to the page to run the check against. Will be combined with the host (specified within the MonitoredResource) and port to construct the full URL. Optional (defaults to \"/\").", - "type": "string" - }, - "port": { - "description": "The port to the page to run the check against. Will be combined with host (specified within the MonitoredResource) and path to construct the full URL. Optional (defaults to 80 without SSL, or 443 with SSL).", - "format": "int32", - "type": "integer" - }, - "useSsl": { - "description": "If true, use HTTPS instead of HTTP to run the check.", - "type": "boolean" - } - }, - "type": "object" - }, - "InternalChecker": { - "description": "An internal checker allows uptime checks to run on private/internal GCP resources.", - "id": "InternalChecker", - "properties": { - "displayName": { - "description": "The checker's human-readable name. The display name should be unique within a Stackdriver Workspace in order to make it easier to identify; however, uniqueness is not enforced.", - "type": "string" - }, - "gcpZone": { - "description": "The GCP zone the uptime check should egress from. Only respected for internal uptime checks, where internal_network is specified.", - "type": "string" - }, - "name": { - "description": "A unique resource name for this InternalChecker. The format is:projects/[PROJECT_ID]/internalCheckers/[CHECKER_ID].PROJECT_ID is the GCP project ID where the internal resource lives. Not necessarily the same as the project_id for the config.", - "type": "string" - }, - "network": { - "description": "The GCP VPC network (https://cloud.google.com/vpc/docs/vpc) where the internal resource lives (ex: \"default\").", - "type": "string" - } - }, - "type": "object" - }, - "LabelDescriptor": { - "description": "A description of a label.", - "id": "LabelDescriptor", - "properties": { - "description": { - "description": "A human-readable description for the label.", - "type": "string" - }, - "key": { - "description": "The label key.", - "type": "string" - }, - "valueType": { - "description": "The type of data that can be assigned to the label.", - "enum": [ - "STRING", - "BOOL", - "INT64" - ], - "enumDescriptions": [ - "A variable-length string. This is the default.", - "Boolean; true or false.", - "A 64-bit signed integer." - ], - "type": "string" - } - }, - "type": "object" - }, - "Linear": { - "description": "Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 \u003c= i \u003c N-1): offset + (width * i). Lower bound (1 \u003c= i \u003c N): offset + (width * (i - 1)).", - "id": "Linear", - "properties": { - "numFiniteBuckets": { - "description": "Must be greater than 0.", - "format": "int32", - "type": "integer" - }, - "offset": { - "description": "Lower bound of the first bucket.", - "format": "double", - "type": "number" - }, - "width": { - "description": "Must be greater than 0.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "ListAlertPoliciesResponse": { - "description": "The protocol for the ListAlertPolicies response.", - "id": "ListAlertPoliciesResponse", - "properties": { - "alertPolicies": { - "description": "The returned alert policies.", - "items": { - "$ref": "AlertPolicy" - }, - "type": "array" - }, - "nextPageToken": { - "description": "If there might be more results than were returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.", - "type": "string" - } - }, - "type": "object" - }, - "ListGroupMembersResponse": { - "description": "The ListGroupMembers response.", - "id": "ListGroupMembersResponse", - "properties": { - "members": { - "description": "A set of monitored resources in the group.", - "items": { - "$ref": "MonitoredResource" - }, - "type": "array" - }, - "nextPageToken": { - "description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.", - "type": "string" - }, - "totalSize": { - "description": "The total number of elements matching this request.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ListGroupsResponse": { - "description": "The ListGroups response.", - "id": "ListGroupsResponse", - "properties": { - "group": { - "description": "The groups that match the specified filters.", - "items": { - "$ref": "Group" - }, - "type": "array" - }, - "nextPageToken": { - "description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.", - "type": "string" - } - }, - "type": "object" - }, - "ListMetricDescriptorsResponse": { - "description": "The ListMetricDescriptors response.", - "id": "ListMetricDescriptorsResponse", - "properties": { - "metricDescriptors": { - "description": "The metric descriptors that are available to the project and that match the value of filter, if present.", - "items": { - "$ref": "MetricDescriptor" - }, - "type": "array" - }, - "nextPageToken": { - "description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.", - "type": "string" - } - }, - "type": "object" - }, - "ListMonitoredResourceDescriptorsResponse": { - "description": "The ListMonitoredResourceDescriptors response.", - "id": "ListMonitoredResourceDescriptorsResponse", - "properties": { - "nextPageToken": { - "description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.", - "type": "string" - }, - "resourceDescriptors": { - "description": "The monitored resource descriptors that are available to this project and that match filter, if present.", - "items": { - "$ref": "MonitoredResourceDescriptor" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListNotificationChannelDescriptorsResponse": { - "description": "The ListNotificationChannelDescriptors response.", - "id": "ListNotificationChannelDescriptorsResponse", - "properties": { - "channelDescriptors": { - "description": "The monitored resource descriptors supported for the specified project, optionally filtered.", - "items": { - "$ref": "NotificationChannelDescriptor" - }, - "type": "array" - }, - "nextPageToken": { - "description": "If not empty, indicates that there may be more results that match the request. Use the value in the page_token field in a subsequent request to fetch the next set of results. If empty, all results have been returned.", - "type": "string" - } - }, - "type": "object" - }, - "ListNotificationChannelsResponse": { - "description": "The ListNotificationChannels response.", - "id": "ListNotificationChannelsResponse", - "properties": { - "nextPageToken": { - "description": "If not empty, indicates that there may be more results that match the request. Use the value in the page_token field in a subsequent request to fetch the next set of results. If empty, all results have been returned.", - "type": "string" - }, - "notificationChannels": { - "description": "The notification channels defined for the specified project.", - "items": { - "$ref": "NotificationChannel" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListTimeSeriesResponse": { - "description": "The ListTimeSeries response.", - "id": "ListTimeSeriesResponse", - "properties": { - "executionErrors": { - "description": "Query execution errors that may have caused the time series data returned to be incomplete.", - "items": { - "$ref": "Status" - }, - "type": "array" - }, - "nextPageToken": { - "description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.", - "type": "string" - }, - "timeSeries": { - "description": "One or more time series that match the filter included in the request.", - "items": { - "$ref": "TimeSeries" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListUptimeCheckConfigsResponse": { - "description": "The protocol for the ListUptimeCheckConfigs response.", - "id": "ListUptimeCheckConfigsResponse", - "properties": { - "nextPageToken": { - "description": "This field represents the pagination token to retrieve the next page of results. If the value is empty, it means no further results for the request. To retrieve the next page of results, the value of the next_page_token is passed to the subsequent List method call (in the request message's page_token field).", - "type": "string" - }, - "totalSize": { - "description": "The total number of uptime check configurations for the project, irrespective of any pagination.", - "format": "int32", - "type": "integer" - }, - "uptimeCheckConfigs": { - "description": "The returned uptime check configurations.", - "items": { - "$ref": "UptimeCheckConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListUptimeCheckIpsResponse": { - "description": "The protocol for the ListUptimeCheckIps response.", - "id": "ListUptimeCheckIpsResponse", - "properties": { - "nextPageToken": { - "description": "This field represents the pagination token to retrieve the next page of results. If the value is empty, it means no further results for the request. To retrieve the next page of results, the value of the next_page_token is passed to the subsequent List method call (in the request message's page_token field). NOTE: this field is not yet implemented", - "type": "string" - }, - "uptimeCheckIps": { - "description": "The returned list of IP addresses (including region and location) that the checkers run from.", - "items": { - "$ref": "UptimeCheckIp" - }, - "type": "array" - } - }, - "type": "object" - }, - "Metric": { - "description": "A specific metric, identified by specifying values for all of the labels of a MetricDescriptor.", - "id": "Metric", - "properties": { - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values.", - "type": "object" - }, - "type": { - "description": "An existing metric type, see google.api.MetricDescriptor. For example, custom.googleapis.com/invoice/paid/amount.", - "type": "string" - } - }, - "type": "object" - }, - "MetricAbsence": { - "description": "A condition type that checks that monitored resources are reporting data. The configuration defines a metric and a set of monitored resources. The predicate is considered in violation when a time series for the specified metric of a monitored resource does not include any data in the specified duration.", - "id": "MetricAbsence", - "properties": { - "aggregations": { - "description": "Specifies the alignment of data points in individual time series as well as how to combine the retrieved time series together (such as when aggregating multiple streams on each resource to a single stream for each resource or when aggregating streams across all members of a group of resrouces). Multiple aggregations are applied in the order specified.This field is similar to the one in the MetricService.ListTimeSeries request. It is advisable to use the ListTimeSeries method when debugging this field.", - "items": { - "$ref": "Aggregation" - }, - "type": "array" - }, - "duration": { - "description": "The amount of time that a time series must fail to report new data to be considered failing. Currently, only values that are a multiple of a minute--e.g. 60, 120, or 300 seconds--are supported. If an invalid value is given, an error will be returned. The Duration.nanos field is ignored.", - "format": "google-duration", - "type": "string" - }, - "filter": { - "description": "A filter that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length.", - "type": "string" - }, - "trigger": { - "$ref": "Trigger", - "description": "The number/percent of time series for which the comparison must hold in order for the condition to trigger. If unspecified, then the condition will trigger if the comparison is true for any of the time series that have been identified by filter and aggregations." - } - }, - "type": "object" - }, - "MetricDescriptor": { - "description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable.", - "id": "MetricDescriptor", - "properties": { - "description": { - "description": "A detailed description of the metric, which can be used in documentation.", - "type": "string" - }, - "displayName": { - "description": "A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example \"Request count\". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota.", - "type": "string" - }, - "labels": { - "description": "The set of labels that can be used to describe a specific instance of this metric type. For example, the appengine.googleapis.com/http/server/response_latencies metric type has a label for the HTTP response code, response_code, so you can look at latencies for successful responses or just for responses that failed.", - "items": { - "$ref": "LabelDescriptor" - }, - "type": "array" - }, - "metadata": { - "$ref": "MetricDescriptorMetadata", - "description": "Optional. Metadata which can be used to guide usage of the metric." - }, - "metricKind": { - "description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metric_kind and value_type might not be supported.", - "enum": [ - "METRIC_KIND_UNSPECIFIED", - "GAUGE", - "DELTA", - "CUMULATIVE" - ], - "enumDescriptions": [ - "Do not use this default value.", - "An instantaneous measurement of a value.", - "The change in a value during a time interval.", - "A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." - ], - "type": "string" - }, - "name": { - "description": "The resource name of the metric descriptor.", - "type": "string" - }, - "type": { - "description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name custom.googleapis.com or external.googleapis.com. Metric types should use a natural hierarchical grouping. For example:\n\"custom.googleapis.com/invoice/paid/amount\"\n\"external.googleapis.com/prometheus/up\"\n\"appengine.googleapis.com/http/server/response_latencies\"\n", - "type": "string" - }, - "unit": { - "description": "The unit in which the metric value is reported. It is only applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are a subset of The Unified Code for Units of Measure (http://unitsofmeasure.org/ucum.html) standard:Basic units (UNIT)\nbit bit\nBy byte\ns second\nmin minute\nh hour\nd dayPrefixes (PREFIX)\nk kilo (10**3)\nM mega (10**6)\nG giga (10**9)\nT tera (10**12)\nP peta (10**15)\nE exa (10**18)\nZ zetta (10**21)\nY yotta (10**24)\nm milli (10**-3)\nu micro (10**-6)\nn nano (10**-9)\np pico (10**-12)\nf femto (10**-15)\na atto (10**-18)\nz zepto (10**-21)\ny yocto (10**-24)\nKi kibi (2**10)\nMi mebi (2**20)\nGi gibi (2**30)\nTi tebi (2**40)GrammarThe grammar also includes these connectors:\n/ division (as an infix operator, e.g. 1/s).\n. multiplication (as an infix operator, e.g. GBy.d)The grammar for a unit is as follows:\nExpression = Component { \".\" Component } { \"/\" Component } ;\n\nComponent = ( [ PREFIX ] UNIT | \"%\" ) [ Annotation ]\n | Annotation\n | \"1\"\n ;\n\nAnnotation = \"{\" NAME \"}\" ;\nNotes:\nAnnotation is just a comment if it follows a UNIT and is equivalent to 1 if it is used alone. For examples, {requests}/s == 1/s, By{transmitted}/s == By/s.\nNAME is a sequence of non-blank printable ASCII characters not containing '{' or '}'.\n1 represents dimensionless value 1, such as in 1/s.\n% represents dimensionless value 1/100, and annotates values giving a percentage.", - "type": "string" - }, - "valueType": { - "description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of metric_kind and value_type might not be supported.", - "enum": [ - "VALUE_TYPE_UNSPECIFIED", - "BOOL", - "INT64", - "DOUBLE", - "STRING", - "DISTRIBUTION", - "MONEY" - ], - "enumDescriptions": [ - "Do not use this default value.", - "The value is a boolean. This value type can be used only if the metric kind is GAUGE.", - "The value is a signed 64-bit integer.", - "The value is a double precision floating point number.", - "The value is a text string. This value type can be used only if the metric kind is GAUGE.", - "The value is a Distribution.", - "The value is money." - ], - "type": "string" - } - }, - "type": "object" - }, - "MetricDescriptorMetadata": { - "description": "Additional annotations that can be used to guide the usage of a metric.", - "id": "MetricDescriptorMetadata", - "properties": { - "ingestDelay": { - "description": "The delay of data points caused by ingestion. Data points older than this age are guaranteed to be ingested and available to be read, excluding data loss due to errors.", - "format": "google-duration", - "type": "string" - }, - "launchStage": { - "description": "The launch stage of the metric definition.", - "enum": [ - "LAUNCH_STAGE_UNSPECIFIED", - "EARLY_ACCESS", - "ALPHA", - "BETA", - "GA", - "DEPRECATED" - ], - "enumDescriptions": [ - "Do not use this default value.", - "Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", - "Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects whitelisted. Alpha releases don’t have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", - "Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", - "GA features are open to all developers and are considered stable and fully qualified for production use.", - "Deprecated features are scheduled to be shut down and removed. For more information, see the “Deprecation Policy” section of our Terms of Service (https://cloud.google.com/terms/) and the Google Cloud Platform Subject to the Deprecation Policy (https://cloud.google.com/terms/deprecation) documentation." - ], - "type": "string" - }, - "samplePeriod": { - "description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "MetricThreshold": { - "description": "A condition type that compares a collection of time series against a threshold.", - "id": "MetricThreshold", - "properties": { - "aggregations": { - "description": "Specifies the alignment of data points in individual time series as well as how to combine the retrieved time series together (such as when aggregating multiple streams on each resource to a single stream for each resource or when aggregating streams across all members of a group of resrouces). Multiple aggregations are applied in the order specified.This field is similar to the one in the MetricService.ListTimeSeries request. It is advisable to use the ListTimeSeries method when debugging this field.", - "items": { - "$ref": "Aggregation" - }, - "type": "array" - }, - "comparison": { - "description": "The comparison to apply between the time series (indicated by filter and aggregation) and the threshold (indicated by threshold_value). The comparison is applied on each time series, with the time series on the left-hand side and the threshold on the right-hand side.Only COMPARISON_LT and COMPARISON_GT are supported currently.", - "enum": [ - "COMPARISON_UNSPECIFIED", - "COMPARISON_GT", - "COMPARISON_GE", - "COMPARISON_LT", - "COMPARISON_LE", - "COMPARISON_EQ", - "COMPARISON_NE" - ], - "enumDescriptions": [ - "No ordering relationship is specified.", - "The left argument is greater than the right argument.", - "The left argument is greater than or equal to the right argument.", - "The left argument is less than the right argument.", - "The left argument is less than or equal to the right argument.", - "The left argument is equal to the right argument.", - "The left argument is not equal to the right argument." - ], - "type": "string" - }, - "denominatorAggregations": { - "description": "Specifies the alignment of data points in individual time series selected by denominatorFilter as well as how to combine the retrieved time series together (such as when aggregating multiple streams on each resource to a single stream for each resource or when aggregating streams across all members of a group of resources).When computing ratios, the aggregations and denominator_aggregations fields must use the same alignment period and produce time series that have the same periodicity and labels.This field is similar to the one in the MetricService.ListTimeSeries request. It is advisable to use the ListTimeSeries method when debugging this field.", - "items": { - "$ref": "Aggregation" - }, - "type": "array" - }, - "denominatorFilter": { - "description": "A filter that identifies a time series that should be used as the denominator of a ratio that will be compared with the threshold. If a denominator_filter is specified, the time series specified by the filter field will be used as the numerator.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length.", - "type": "string" - }, - "duration": { - "description": "The amount of time that a time series must violate the threshold to be considered failing. Currently, only values that are a multiple of a minute--e.g., 0, 60, 120, or 300 seconds--are supported. If an invalid value is given, an error will be returned. When choosing a duration, it is useful to keep in mind the frequency of the underlying time series data (which may also be affected by any alignments specified in the aggregations field); a good duration is long enough so that a single outlier does not generate spurious alerts, but short enough that unhealthy states are detected and alerted on quickly.", - "format": "google-duration", - "type": "string" - }, - "filter": { - "description": "A filter that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length.", - "type": "string" - }, - "thresholdValue": { - "description": "A value against which to compare the time series.", - "format": "double", - "type": "number" - }, - "trigger": { - "$ref": "Trigger", - "description": "The number/percent of time series for which the comparison must hold in order for the condition to trigger. If unspecified, then the condition will trigger if the comparison is true for any of the time series that have been identified by filter and aggregations, or by the ratio, if denominator_filter and denominator_aggregations are specified." - } - }, - "type": "object" - }, - "MonitoredResource": { - "description": "An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for \"gce_instance\" has labels \"instance_id\" and \"zone\":\n{ \"type\": \"gce_instance\",\n \"labels\": { \"instance_id\": \"12345678901234\",\n \"zone\": \"us-central1-a\" }}\n", - "id": "MonitoredResource", - "properties": { - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels \"project_id\", \"instance_id\", and \"zone\".", - "type": "object" - }, - "type": { - "description": "Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types and Logging resource types.", - "type": "string" - } - }, - "type": "object" - }, - "MonitoredResourceDescriptor": { - "description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of \"gce_instance\" and specifies the use of the labels \"instance_id\" and \"zone\" to identify particular VM instances.Different APIs can support different monitored resource types. APIs generally provide a list method that returns the monitored resource descriptors used by the API.", - "id": "MonitoredResourceDescriptor", - "properties": { - "description": { - "description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", - "type": "string" - }, - "displayName": { - "description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, \"Google Cloud SQL Database\".", - "type": "string" - }, - "labels": { - "description": "Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels \"database_id\" and \"zone\".", - "items": { - "$ref": "LabelDescriptor" - }, - "type": "array" - }, - "name": { - "description": "Optional. The resource name of the monitored resource descriptor: \"projects/{project_id}/monitoredResourceDescriptors/{type}\" where {type} is the value of the type field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format \"monitoredResourceDescriptors/{type}\".", - "type": "string" - }, - "type": { - "description": "Required. The monitored resource type. For example, the type \"cloudsql_database\" represents databases in Google Cloud SQL. The maximum length of this value is 256 characters.", - "type": "string" - } - }, - "type": "object" - }, - "MonitoredResourceMetadata": { - "description": "Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message.", - "id": "MonitoredResourceMetadata", - "properties": { - "systemLabels": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including \"machine_image\", \"vpc\", \"subnet_id\", \"security_group\", \"name\", etc. System label values can be only strings, Boolean values, or a list of strings. For example:\n{ \"name\": \"my-test-instance\",\n \"security_group\": [\"a\", \"b\", \"c\"],\n \"spot_instance\": false }\n", - "type": "object" - }, - "userLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Output only. A map of user-defined metadata labels.", - "type": "object" - } - }, - "type": "object" - }, - "MutationRecord": { - "description": "Describes a change made to a configuration.", - "id": "MutationRecord", - "properties": { - "mutateTime": { - "description": "When the change occurred.", - "format": "google-datetime", - "type": "string" - }, - "mutatedBy": { - "description": "The email address of the user making the change.", - "type": "string" - } - }, - "type": "object" - }, - "NotificationChannel": { - "description": "A NotificationChannel is a medium through which an alert is delivered when a policy violation is detected. Examples of channels include email, SMS, and third-party messaging applications. Fields containing sensitive information like authentication tokens or contact info are only partially populated on retrieval.", - "id": "NotificationChannel", - "properties": { - "description": { - "description": "An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceeed 1024 Unicode characters.", - "type": "string" - }, - "displayName": { - "description": "An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters.", - "type": "string" - }, - "enabled": { - "description": "Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.", - "type": "boolean" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field.", - "type": "object" - }, - "name": { - "description": "The full REST resource name for this channel. The syntax is:\nprojects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]\nThe [CHANNEL_ID] is automatically assigned by the server on creation.", - "type": "string" - }, - "type": { - "description": "The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field.", - "type": "string" - }, - "userLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.", - "type": "object" - }, - "verificationStatus": { - "description": "Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being required for channels of this type.This field cannot be modified using a standard UpdateNotificationChannel operation. To change the value of this field, you must call VerifyNotificationChannel.", - "enum": [ - "VERIFICATION_STATUS_UNSPECIFIED", - "UNVERIFIED", - "VERIFIED" - ], - "enumDescriptions": [ - "Sentinel value used to indicate that the state is unknown, omitted, or is not applicable (as in the case of channels that neither support nor require verification in order to function).", - "The channel has yet to be verified and requires verification to function. Note that this state also applies to the case where the verification process has been initiated by sending a verification code but where the verification code has not been submitted to complete the process.", - "It has been proven that notifications can be received on this notification channel and that someone on the project has access to messages that are delivered to that channel." - ], - "type": "string" - } - }, - "type": "object" - }, - "NotificationChannelDescriptor": { - "description": "A description of a notification channel. The descriptor includes the properties of the channel and the set of labels or fields that must be specified to configure channels of a given type.", - "id": "NotificationChannelDescriptor", - "properties": { - "description": { - "description": "A human-readable description of the notification channel type. The description may include a description of the properties of the channel and pointers to external documentation.", - "type": "string" - }, - "displayName": { - "description": "A human-readable name for the notification channel type. This form of the name is suitable for a user interface.", - "type": "string" - }, - "labels": { - "description": "The set of labels that must be defined to identify a particular channel of the corresponding type. Each label includes a description for how that field should be populated.", - "items": { - "$ref": "LabelDescriptor" - }, - "type": "array" - }, - "name": { - "description": "The full REST resource name for this descriptor. The syntax is:\nprojects/[PROJECT_ID]/notificationChannelDescriptors/[TYPE]\nIn the above, [TYPE] is the value of the type field.", - "type": "string" - }, - "supportedTiers": { - "description": "The tiers that support this notification channel; the project service tier must be one of the supported_tiers.", - "enumDescriptions": [ - "An invalid sentinel value, used to indicate that a tier has not been provided explicitly.", - "The Stackdriver Basic tier, a free tier of service that provides basic features, a moderate allotment of logs, and access to built-in metrics. A number of features are not available in this tier. For more details, see the service tiers documentation (https://cloud.google.com/monitoring/workspaces/tiers).", - "The Stackdriver Premium tier, a higher, more expensive tier of service that provides access to all Stackdriver features, lets you use Stackdriver with AWS accounts, and has a larger allotments for logs and metrics. For more details, see the service tiers documentation (https://cloud.google.com/monitoring/workspaces/tiers)." - ], - "items": { - "enum": [ - "SERVICE_TIER_UNSPECIFIED", - "SERVICE_TIER_BASIC", - "SERVICE_TIER_PREMIUM" - ], - "type": "string" - }, - "type": "array" - }, - "type": { - "description": "The type of notification channel, such as \"email\", \"sms\", etc. Notification channel types are globally unique.", - "type": "string" - } - }, - "type": "object" - }, - "Option": { - "description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", - "id": "Option", - "properties": { - "name": { - "description": "The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, \"map_entry\". For custom options, it should be the fully-qualified name. For example, \"google.api.http\".", - "type": "string" - }, - "value": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.", - "type": "object" - } - }, - "type": "object" - }, - "Point": { - "description": "A single data point in a time series.", - "id": "Point", - "properties": { - "interval": { - "$ref": "TimeInterval", - "description": "The time interval to which the data point applies. For GAUGE metrics, only the end time of the interval is used. For DELTA metrics, the start and end time should specify a non-zero interval, with subsequent points specifying contiguous and non-overlapping intervals. For CUMULATIVE metrics, the start and end time should specify a non-zero interval, with subsequent points specifying the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." - }, - "value": { - "$ref": "TypedValue", - "description": "The value of the data point." - } - }, - "type": "object" - }, - "Range": { - "description": "The range of the population values.", - "id": "Range", - "properties": { - "max": { - "description": "The maximum of the population values.", - "format": "double", - "type": "number" - }, - "min": { - "description": "The minimum of the population values.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "ResourceGroup": { - "description": "The resource submessage for group checks. It can be used instead of a monitored resource, when multiple resources are being monitored.", - "id": "ResourceGroup", - "properties": { - "groupId": { - "description": "The group of resources being monitored. Should be only the group_id, not projects/\u003cproject_id\u003e/groups/\u003cgroup_id\u003e.", - "type": "string" - }, - "resourceType": { - "description": "The resource type of the group members.", - "enum": [ - "RESOURCE_TYPE_UNSPECIFIED", - "INSTANCE", - "AWS_ELB_LOAD_BALANCER" - ], - "enumDescriptions": [ - "Default value (not valid).", - "A group of instances from Google Cloud Platform (GCP) or Amazon Web Services (AWS).", - "A group of Amazon ELB load balancers." - ], - "type": "string" - } - }, - "type": "object" - }, - "SendNotificationChannelVerificationCodeRequest": { - "description": "The SendNotificationChannelVerificationCode request.", - "id": "SendNotificationChannelVerificationCodeRequest", - "properties": {}, - "type": "object" - }, - "SourceContext": { - "description": "SourceContext represents information about the source of a protobuf element, like the file in which it is defined.", - "id": "SourceContext", - "properties": { - "fileName": { - "description": "The path-qualified name of the .proto file that contained the associated protobuf element. For example: \"google/protobuf/source_context.proto\".", - "type": "string" - } - }, - "type": "object" - }, - "SpanContext": { - "description": "The context of a span, attached to google.api.Distribution.Exemplars in google.api.Distribution values during aggregation.It contains the name of a span with format: projects/PROJECT_ID/traces/TRACE_ID/spans/SPAN_ID", - "id": "SpanContext", - "properties": { - "spanName": { - "description": "The resource name of the span in the following format:\nprojects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]\nTRACE_ID is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array.SPAN_ID is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array.", - "type": "string" - } - }, - "type": "object" - }, - "Status": { - "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", - "id": "Status", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32", - "type": "integer" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "type": "object" - }, - "TcpCheck": { - "description": "Information required for a TCP uptime check request.", - "id": "TcpCheck", - "properties": { - "port": { - "description": "The port to the page to run the check against. Will be combined with host (specified within the MonitoredResource) to construct the full URL. Required.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "TimeInterval": { - "description": "A time interval extending just after a start time through an end time. If the start time is the same as the end time, then the interval represents a single point in time.", - "id": "TimeInterval", - "properties": { - "endTime": { - "description": "Required. The end of the time interval.", - "format": "google-datetime", - "type": "string" - }, - "startTime": { - "description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "TimeSeries": { - "description": "A collection of data points that describes the time-varying values of a metric. A time series is identified by a combination of a fully-specified monitored resource and a fully-specified metric. This type is used for both listing and creating time series.", - "id": "TimeSeries", - "properties": { - "metadata": { - "$ref": "MonitoredResourceMetadata", - "description": "Output only. The associated monitored resource metadata. When reading a a timeseries, this field will include metadata labels that are explicitly named in the reduction. When creating a timeseries, this field is ignored." - }, - "metric": { - "$ref": "Metric", - "description": "The associated metric. A fully-specified metric used to identify the time series." - }, - "metricKind": { - "description": "The metric kind of the time series. When listing time series, this metric kind might be different from the metric kind of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the metric kind of the associated metric. If the associated metric's descriptor must be auto-created, then this field specifies the metric kind of the new descriptor and must be either GAUGE (the default) or CUMULATIVE.", - "enum": [ - "METRIC_KIND_UNSPECIFIED", - "GAUGE", - "DELTA", - "CUMULATIVE" - ], - "enumDescriptions": [ - "Do not use this default value.", - "An instantaneous measurement of a value.", - "The change in a value during a time interval.", - "A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." - ], - "type": "string" - }, - "points": { - "description": "The data points of this time series. When listing time series, points are returned in reverse time order.When creating a time series, this field must contain exactly one point and the point's type must be the same as the value type of the associated metric. If the associated metric's descriptor must be auto-created, then the value type of the descriptor is determined by the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION.", - "items": { - "$ref": "Point" - }, - "type": "array" - }, - "resource": { - "$ref": "MonitoredResource", - "description": "The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data." - }, - "valueType": { - "description": "The value type of the time series. When listing time series, this value type might be different from the value type of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the type of the data in the points field.", - "enum": [ - "VALUE_TYPE_UNSPECIFIED", - "BOOL", - "INT64", - "DOUBLE", - "STRING", - "DISTRIBUTION", - "MONEY" - ], - "enumDescriptions": [ - "Do not use this default value.", - "The value is a boolean. This value type can be used only if the metric kind is GAUGE.", - "The value is a signed 64-bit integer.", - "The value is a double precision floating point number.", - "The value is a text string. This value type can be used only if the metric kind is GAUGE.", - "The value is a Distribution.", - "The value is money." - ], - "type": "string" - } - }, - "type": "object" - }, - "Trigger": { - "description": "Specifies how many time series must fail a predicate to trigger a condition. If not specified, then a {count: 1} trigger is used.", - "id": "Trigger", - "properties": { - "count": { - "description": "The absolute number of time series that must fail the predicate for the condition to be triggered.", - "format": "int32", - "type": "integer" - }, - "percent": { - "description": "The percentage of time series that must fail the predicate for the condition to be triggered.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "Type": { - "description": "A protocol buffer message type.", - "id": "Type", - "properties": { - "fields": { - "description": "The list of fields.", - "items": { - "$ref": "Field" - }, - "type": "array" - }, - "name": { - "description": "The fully qualified message name.", - "type": "string" - }, - "oneofs": { - "description": "The list of types appearing in oneof definitions in this type.", - "items": { - "type": "string" - }, - "type": "array" - }, - "options": { - "description": "The protocol buffer options.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, - "sourceContext": { - "$ref": "SourceContext", - "description": "The source context." - }, - "syntax": { - "description": "The source syntax.", - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ], - "enumDescriptions": [ - "Syntax proto2.", - "Syntax proto3." - ], - "type": "string" - } - }, - "type": "object" - }, - "TypedValue": { - "description": "A single strongly-typed value.", - "id": "TypedValue", - "properties": { - "boolValue": { - "description": "A Boolean value: true or false.", - "type": "boolean" - }, - "distributionValue": { - "$ref": "Distribution", - "description": "A distribution value." - }, - "doubleValue": { - "description": "A 64-bit double-precision floating-point number. Its magnitude is approximately \u0026plusmn;10\u003csup\u003e\u0026plusmn;300\u003c/sup\u003e and it has 16 significant digits of precision.", - "format": "double", - "type": "number" - }, - "int64Value": { - "description": "A 64-bit integer. Its range is approximately \u0026plusmn;9.2x10\u003csup\u003e18\u003c/sup\u003e.", - "format": "int64", - "type": "string" - }, - "stringValue": { - "description": "A variable-length string value.", - "type": "string" - } - }, - "type": "object" - }, - "UptimeCheckConfig": { - "description": "This message configures which resources and services to monitor for availability.", - "id": "UptimeCheckConfig", - "properties": { - "contentMatchers": { - "description": "The expected content on the page the check is run against. Currently, only the first entry in the list is supported, and other entries will be ignored. The server will look for an exact match of the string in the page response's content. This field is optional and should only be specified if a content match is required.", - "items": { - "$ref": "ContentMatcher" - }, - "type": "array" - }, - "displayName": { - "description": "A human-friendly name for the uptime check configuration. The display name should be unique within a Stackdriver Workspace in order to make it easier to identify; however, uniqueness is not enforced. Required.", - "type": "string" - }, - "httpCheck": { - "$ref": "HttpCheck", - "description": "Contains information needed to make an HTTP or HTTPS check." - }, - "internalCheckers": { - "description": "The internal checkers that this check will egress from. If is_internal is true and this list is empty, the check will egress from all InternalCheckers configured for the project that owns this CheckConfig.", - "items": { - "$ref": "InternalChecker" - }, - "type": "array" - }, - "isInternal": { - "description": "Denotes whether this is a check that egresses from InternalCheckers.", - "type": "boolean" - }, - "monitoredResource": { - "$ref": "MonitoredResource", - "description": "The monitored resource (https://cloud.google.com/monitoring/api/resources) associated with the configuration. The following monitored resource types are supported for uptime checks: uptime_url gce_instance gae_app aws_ec2_instance aws_elb_load_balancer" - }, - "name": { - "description": "A unique resource name for this UptimeCheckConfig. The format is:projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].This field should be omitted when creating the uptime check configuration; on create, the resource name is assigned by the server and included in the response.", - "type": "string" - }, - "period": { - "description": "How often, in seconds, the uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 300s.", - "format": "google-duration", - "type": "string" - }, - "resourceGroup": { - "$ref": "ResourceGroup", - "description": "The group resource associated with the configuration." - }, - "selectedRegions": { - "description": "The list of regions from which the check will be run. If this field is specified, enough regions to include a minimum of 3 locations must be provided, or an error message is returned. Not specifying this field will result in uptime checks running from all regions.", - "enumDescriptions": [ - "Default value if no region is specified. Will result in uptime checks running from all regions.", - "Allows checks to run from locations within the United States of America.", - "Allows checks to run from locations within the continent of Europe.", - "Allows checks to run from locations within the continent of South America.", - "Allows checks to run from locations within the Asia Pacific area (ex: Singapore)." - ], - "items": { - "enum": [ - "REGION_UNSPECIFIED", - "USA", - "EUROPE", - "SOUTH_AMERICA", - "ASIA_PACIFIC" - ], - "type": "string" - }, - "type": "array" - }, - "tcpCheck": { - "$ref": "TcpCheck", - "description": "Contains information needed to make a TCP check." - }, - "timeout": { - "description": "The maximum amount of time to wait for the request to complete (must be between 1 and 60 seconds). Required.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "UptimeCheckIp": { - "description": "Contains the region, location, and list of IP addresses where checkers in the location run from.", - "id": "UptimeCheckIp", - "properties": { - "ipAddress": { - "description": "The IP address from which the uptime check originates. This is a full IP address (not an IP address range). Most IP addresses, as of this publication, are in IPv4 format; however, one should not rely on the IP addresses being in IPv4 format indefinitely and should support interpreting this field in either IPv4 or IPv6 format.", - "type": "string" - }, - "location": { - "description": "A more specific location within the region that typically encodes a particular city/town/metro (and its containing state/province or country) within the broader umbrella region category.", - "type": "string" - }, - "region": { - "description": "A broad region category in which the IP address is located.", - "enum": [ - "REGION_UNSPECIFIED", - "USA", - "EUROPE", - "SOUTH_AMERICA", - "ASIA_PACIFIC" - ], - "enumDescriptions": [ - "Default value if no region is specified. Will result in uptime checks running from all regions.", - "Allows checks to run from locations within the United States of America.", - "Allows checks to run from locations within the continent of Europe.", - "Allows checks to run from locations within the continent of South America.", - "Allows checks to run from locations within the Asia Pacific area (ex: Singapore)." - ], - "type": "string" - } - }, - "type": "object" - }, - "VerifyNotificationChannelRequest": { - "description": "The VerifyNotificationChannel request.", - "id": "VerifyNotificationChannelRequest", - "properties": { - "code": { - "description": "The verification code that was delivered to the channel as a result of invoking the SendNotificationChannelVerificationCode API method or that was retrieved from a verified channel via GetNotificationChannelVerificationCode. For example, one might have \"G-123456\" or \"TKNZGhhd2EyN3I1MnRnMjRv\" (in general, one is only guaranteed that the code is valid UTF-8; one should not make any assumptions regarding the structure or format of the code).", - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "", - "title": "Stackdriver Monitoring API", - "version": "v3", - "version_module": true -} \ No newline at end of file diff --git a/vendor/google.golang.org/api/monitoring/v3/monitoring-gen.go b/vendor/google.golang.org/api/monitoring/v3/monitoring-gen.go deleted file mode 100644 index d95b1d03..00000000 --- a/vendor/google.golang.org/api/monitoring/v3/monitoring-gen.go +++ /dev/null @@ -1,11613 +0,0 @@ -// Package monitoring provides access to the Stackdriver Monitoring API. -// -// This package is DEPRECATED. Use package cloud.google.com/go/monitoring/apiv3 instead. -// -// See https://cloud.google.com/monitoring/api/ -// -// Usage example: -// -// import "google.golang.org/api/monitoring/v3" -// ... -// monitoringService, err := monitoring.New(oauthHttpClient) -package monitoring // import "google.golang.org/api/monitoring/v3" - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled -var _ = ctxhttp.Do - -const apiId = "monitoring:v3" -const apiName = "monitoring" -const apiVersion = "v3" -const basePath = "https://monitoring.googleapis.com/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // View and write monitoring data for all of your Google and third-party - // Cloud and API projects - MonitoringScope = "https://www.googleapis.com/auth/monitoring" - - // View monitoring data for all of your Google Cloud and third-party - // projects - MonitoringReadScope = "https://www.googleapis.com/auth/monitoring.read" - - // Publish metric data to your Google Cloud projects - MonitoringWriteScope = "https://www.googleapis.com/auth/monitoring.write" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.MetricDescriptors = NewMetricDescriptorsService(s) - s.MonitoredResourceDescriptors = NewMonitoredResourceDescriptorsService(s) - s.Projects = NewProjectsService(s) - s.TimeSeries = NewTimeSeriesService(s) - s.UptimeCheckIps = NewUptimeCheckIpsService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - MetricDescriptors *MetricDescriptorsService - - MonitoredResourceDescriptors *MonitoredResourceDescriptorsService - - Projects *ProjectsService - - TimeSeries *TimeSeriesService - - UptimeCheckIps *UptimeCheckIpsService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewMetricDescriptorsService(s *Service) *MetricDescriptorsService { - rs := &MetricDescriptorsService{s: s} - return rs -} - -type MetricDescriptorsService struct { - s *Service -} - -func NewMonitoredResourceDescriptorsService(s *Service) *MonitoredResourceDescriptorsService { - rs := &MonitoredResourceDescriptorsService{s: s} - return rs -} - -type MonitoredResourceDescriptorsService struct { - s *Service -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - rs.AlertPolicies = NewProjectsAlertPoliciesService(s) - rs.CollectdTimeSeries = NewProjectsCollectdTimeSeriesService(s) - rs.Groups = NewProjectsGroupsService(s) - rs.MetricDescriptors = NewProjectsMetricDescriptorsService(s) - rs.MonitoredResourceDescriptors = NewProjectsMonitoredResourceDescriptorsService(s) - rs.NotificationChannelDescriptors = NewProjectsNotificationChannelDescriptorsService(s) - rs.NotificationChannels = NewProjectsNotificationChannelsService(s) - rs.TimeSeries = NewProjectsTimeSeriesService(s) - rs.UptimeCheckConfigs = NewProjectsUptimeCheckConfigsService(s) - return rs -} - -type ProjectsService struct { - s *Service - - AlertPolicies *ProjectsAlertPoliciesService - - CollectdTimeSeries *ProjectsCollectdTimeSeriesService - - Groups *ProjectsGroupsService - - MetricDescriptors *ProjectsMetricDescriptorsService - - MonitoredResourceDescriptors *ProjectsMonitoredResourceDescriptorsService - - NotificationChannelDescriptors *ProjectsNotificationChannelDescriptorsService - - NotificationChannels *ProjectsNotificationChannelsService - - TimeSeries *ProjectsTimeSeriesService - - UptimeCheckConfigs *ProjectsUptimeCheckConfigsService -} - -func NewProjectsAlertPoliciesService(s *Service) *ProjectsAlertPoliciesService { - rs := &ProjectsAlertPoliciesService{s: s} - return rs -} - -type ProjectsAlertPoliciesService struct { - s *Service -} - -func NewProjectsCollectdTimeSeriesService(s *Service) *ProjectsCollectdTimeSeriesService { - rs := &ProjectsCollectdTimeSeriesService{s: s} - return rs -} - -type ProjectsCollectdTimeSeriesService struct { - s *Service -} - -func NewProjectsGroupsService(s *Service) *ProjectsGroupsService { - rs := &ProjectsGroupsService{s: s} - rs.Members = NewProjectsGroupsMembersService(s) - return rs -} - -type ProjectsGroupsService struct { - s *Service - - Members *ProjectsGroupsMembersService -} - -func NewProjectsGroupsMembersService(s *Service) *ProjectsGroupsMembersService { - rs := &ProjectsGroupsMembersService{s: s} - return rs -} - -type ProjectsGroupsMembersService struct { - s *Service -} - -func NewProjectsMetricDescriptorsService(s *Service) *ProjectsMetricDescriptorsService { - rs := &ProjectsMetricDescriptorsService{s: s} - return rs -} - -type ProjectsMetricDescriptorsService struct { - s *Service -} - -func NewProjectsMonitoredResourceDescriptorsService(s *Service) *ProjectsMonitoredResourceDescriptorsService { - rs := &ProjectsMonitoredResourceDescriptorsService{s: s} - return rs -} - -type ProjectsMonitoredResourceDescriptorsService struct { - s *Service -} - -func NewProjectsNotificationChannelDescriptorsService(s *Service) *ProjectsNotificationChannelDescriptorsService { - rs := &ProjectsNotificationChannelDescriptorsService{s: s} - return rs -} - -type ProjectsNotificationChannelDescriptorsService struct { - s *Service -} - -func NewProjectsNotificationChannelsService(s *Service) *ProjectsNotificationChannelsService { - rs := &ProjectsNotificationChannelsService{s: s} - return rs -} - -type ProjectsNotificationChannelsService struct { - s *Service -} - -func NewProjectsTimeSeriesService(s *Service) *ProjectsTimeSeriesService { - rs := &ProjectsTimeSeriesService{s: s} - return rs -} - -type ProjectsTimeSeriesService struct { - s *Service -} - -func NewProjectsUptimeCheckConfigsService(s *Service) *ProjectsUptimeCheckConfigsService { - rs := &ProjectsUptimeCheckConfigsService{s: s} - return rs -} - -type ProjectsUptimeCheckConfigsService struct { - s *Service -} - -func NewTimeSeriesService(s *Service) *TimeSeriesService { - rs := &TimeSeriesService{s: s} - return rs -} - -type TimeSeriesService struct { - s *Service -} - -func NewUptimeCheckIpsService(s *Service) *UptimeCheckIpsService { - rs := &UptimeCheckIpsService{s: s} - return rs -} - -type UptimeCheckIpsService struct { - s *Service -} - -// Aggregation: Describes how to combine multiple time series to provide -// different views of the data. Aggregation consists of an alignment -// step on individual time series (alignment_period and -// per_series_aligner) followed by an optional reduction step of the -// data across the aligned time series (cross_series_reducer and -// group_by_fields). For more details, see Aggregation. -type Aggregation struct { - // AlignmentPeriod: The alignment period for per-time series alignment. - // If present, alignmentPeriod must be at least 60 seconds. After - // per-time series alignment, each time series will contain data points - // only on the period boundaries. If perSeriesAligner is not specified - // or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner - // is specified and does not equal ALIGN_NONE, then this field must be - // defined; otherwise an error is returned. - AlignmentPeriod string `json:"alignmentPeriod,omitempty"` - - // CrossSeriesReducer: The approach to be used to combine time series. - // Not all reducer functions may be applied to all time series, - // depending on the metric type and the value type of the original time - // series. Reduction may change the metric type of value type of the - // time series.Time series data must be aligned in order to perform - // cross-time series reduction. If crossSeriesReducer is specified, then - // perSeriesAligner must be specified and not equal ALIGN_NONE and - // alignmentPeriod must be specified; otherwise, an error is returned. - // - // Possible values: - // "REDUCE_NONE" - No cross-time series reduction. The output of the - // aligner is returned. - // "REDUCE_MEAN" - Reduce by computing the mean across time series for - // each alignment period. This reducer is valid for delta and gauge - // metrics with numeric or distribution values. The value type of the - // output is DOUBLE. - // "REDUCE_MIN" - Reduce by computing the minimum across time series - // for each alignment period. This reducer is valid for delta and gauge - // metrics with numeric values. The value type of the output is the same - // as the value type of the input. - // "REDUCE_MAX" - Reduce by computing the maximum across time series - // for each alignment period. This reducer is valid for delta and gauge - // metrics with numeric values. The value type of the output is the same - // as the value type of the input. - // "REDUCE_SUM" - Reduce by computing the sum across time series for - // each alignment period. This reducer is valid for delta and gauge - // metrics with numeric and distribution values. The value type of the - // output is the same as the value type of the input. - // "REDUCE_STDDEV" - Reduce by computing the standard deviation across - // time series for each alignment period. This reducer is valid for - // delta and gauge metrics with numeric or distribution values. The - // value type of the output is DOUBLE. - // "REDUCE_COUNT" - Reduce by computing the count of data points - // across time series for each alignment period. This reducer is valid - // for delta and gauge metrics of numeric, Boolean, distribution, and - // string value type. The value type of the output is INT64. - // "REDUCE_COUNT_TRUE" - Reduce by computing the count of True-valued - // data points across time series for each alignment period. This - // reducer is valid for delta and gauge metrics of Boolean value type. - // The value type of the output is INT64. - // "REDUCE_COUNT_FALSE" - Reduce by computing the count of - // False-valued data points across time series for each alignment - // period. This reducer is valid for delta and gauge metrics of Boolean - // value type. The value type of the output is INT64. - // "REDUCE_FRACTION_TRUE" - Reduce by computing the fraction of - // True-valued data points across time series for each alignment period. - // This reducer is valid for delta and gauge metrics of Boolean value - // type. The output value is in the range 0, 1 and has value type - // DOUBLE. - // "REDUCE_PERCENTILE_99" - Reduce by computing 99th percentile of - // data points across time series for each alignment period. This - // reducer is valid for gauge and delta metrics of numeric and - // distribution type. The value of the output is DOUBLE - // "REDUCE_PERCENTILE_95" - Reduce by computing 95th percentile of - // data points across time series for each alignment period. This - // reducer is valid for gauge and delta metrics of numeric and - // distribution type. The value of the output is DOUBLE - // "REDUCE_PERCENTILE_50" - Reduce by computing 50th percentile of - // data points across time series for each alignment period. This - // reducer is valid for gauge and delta metrics of numeric and - // distribution type. The value of the output is DOUBLE - // "REDUCE_PERCENTILE_05" - Reduce by computing 5th percentile of data - // points across time series for each alignment period. This reducer is - // valid for gauge and delta metrics of numeric and distribution type. - // The value of the output is DOUBLE - CrossSeriesReducer string `json:"crossSeriesReducer,omitempty"` - - // GroupByFields: The set of fields to preserve when crossSeriesReducer - // is specified. The groupByFields determine how the time series are - // partitioned into subsets prior to applying the aggregation function. - // Each subset contains time series that have the same value for each of - // the grouping fields. Each individual time series is a member of - // exactly one subset. The crossSeriesReducer is applied to each subset - // of time series. It is not possible to reduce across different - // resource types, so this field implicitly contains resource.type. - // Fields not specified in groupByFields are aggregated away. If - // groupByFields is not specified and all the time series have the same - // resource type, then the time series are aggregated into a single - // output time series. If crossSeriesReducer is not defined, this field - // is ignored. - GroupByFields []string `json:"groupByFields,omitempty"` - - // PerSeriesAligner: The approach to be used to align individual time - // series. Not all alignment functions may be applied to all time - // series, depending on the metric type and value type of the original - // time series. Alignment may change the metric type or the value type - // of the time series.Time series data must be aligned in order to - // perform cross-time series reduction. If crossSeriesReducer is - // specified, then perSeriesAligner must be specified and not equal - // ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error - // is returned. - // - // Possible values: - // "ALIGN_NONE" - No alignment. Raw data is returned. Not valid if - // cross-time series reduction is requested. The value type of the - // result is the same as the value type of the input. - // "ALIGN_DELTA" - Align and convert to delta metric type. This - // alignment is valid for cumulative metrics and delta metrics. Aligning - // an existing delta metric to a delta metric requires that the - // alignment period be increased. The value type of the result is the - // same as the value type of the input.One can think of this aligner as - // a rate but without time units; that is, the output is conceptually - // (second_point - first_point). - // "ALIGN_RATE" - Align and convert to a rate. This alignment is valid - // for cumulative metrics and delta metrics with numeric values. The - // output is a gauge metric with value type DOUBLE.One can think of this - // aligner as conceptually providing the slope of the line that passes - // through the value at the start and end of the window. In other words, - // this is conceptually ((y1 - y0)/(t1 - t0)), and the output unit is - // one that has a "/time" dimension.If, by rate, you are looking for - // percentage change, see the ALIGN_PERCENT_CHANGE aligner option. - // "ALIGN_INTERPOLATE" - Align by interpolating between adjacent - // points around the period boundary. This alignment is valid for gauge - // metrics with numeric values. The value type of the result is the same - // as the value type of the input. - // "ALIGN_NEXT_OLDER" - Align by shifting the oldest data point before - // the period boundary to the boundary. This alignment is valid for - // gauge metrics. The value type of the result is the same as the value - // type of the input. - // "ALIGN_MIN" - Align time series via aggregation. The resulting data - // point in the alignment period is the minimum of all data points in - // the period. This alignment is valid for gauge and delta metrics with - // numeric values. The value type of the result is the same as the value - // type of the input. - // "ALIGN_MAX" - Align time series via aggregation. The resulting data - // point in the alignment period is the maximum of all data points in - // the period. This alignment is valid for gauge and delta metrics with - // numeric values. The value type of the result is the same as the value - // type of the input. - // "ALIGN_MEAN" - Align time series via aggregation. The resulting - // data point in the alignment period is the average or arithmetic mean - // of all data points in the period. This alignment is valid for gauge - // and delta metrics with numeric values. The value type of the output - // is DOUBLE. - // "ALIGN_COUNT" - Align time series via aggregation. The resulting - // data point in the alignment period is the count of all data points in - // the period. This alignment is valid for gauge and delta metrics with - // numeric or Boolean values. The value type of the output is INT64. - // "ALIGN_SUM" - Align time series via aggregation. The resulting data - // point in the alignment period is the sum of all data points in the - // period. This alignment is valid for gauge and delta metrics with - // numeric and distribution values. The value type of the output is the - // same as the value type of the input. - // "ALIGN_STDDEV" - Align time series via aggregation. The resulting - // data point in the alignment period is the standard deviation of all - // data points in the period. This alignment is valid for gauge and - // delta metrics with numeric values. The value type of the output is - // DOUBLE. - // "ALIGN_COUNT_TRUE" - Align time series via aggregation. The - // resulting data point in the alignment period is the count of - // True-valued data points in the period. This alignment is valid for - // gauge metrics with Boolean values. The value type of the output is - // INT64. - // "ALIGN_COUNT_FALSE" - Align time series via aggregation. The - // resulting data point in the alignment period is the count of - // False-valued data points in the period. This alignment is valid for - // gauge metrics with Boolean values. The value type of the output is - // INT64. - // "ALIGN_FRACTION_TRUE" - Align time series via aggregation. The - // resulting data point in the alignment period is the fraction of - // True-valued data points in the period. This alignment is valid for - // gauge metrics with Boolean values. The output value is in the range - // 0, 1 and has value type DOUBLE. - // "ALIGN_PERCENTILE_99" - Align time series via aggregation. The - // resulting data point in the alignment period is the 99th percentile - // of all data points in the period. This alignment is valid for gauge - // and delta metrics with distribution values. The output is a gauge - // metric with value type DOUBLE. - // "ALIGN_PERCENTILE_95" - Align time series via aggregation. The - // resulting data point in the alignment period is the 95th percentile - // of all data points in the period. This alignment is valid for gauge - // and delta metrics with distribution values. The output is a gauge - // metric with value type DOUBLE. - // "ALIGN_PERCENTILE_50" - Align time series via aggregation. The - // resulting data point in the alignment period is the 50th percentile - // of all data points in the period. This alignment is valid for gauge - // and delta metrics with distribution values. The output is a gauge - // metric with value type DOUBLE. - // "ALIGN_PERCENTILE_05" - Align time series via aggregation. The - // resulting data point in the alignment period is the 5th percentile of - // all data points in the period. This alignment is valid for gauge and - // delta metrics with distribution values. The output is a gauge metric - // with value type DOUBLE. - // "ALIGN_PERCENT_CHANGE" - Align and convert to a percentage change. - // This alignment is valid for gauge and delta metrics with numeric - // values. This alignment conceptually computes the equivalent of - // "((current - previous)/previous)*100" where previous value is - // determined based on the alignmentPeriod. In the event that previous - // is 0 the calculated value is infinity with the exception that if both - // (current - previous) and previous are 0 the calculated value is 0. A - // 10 minute moving mean is computed at each point of the time window - // prior to the above calculation to smooth the metric and prevent false - // positives from very short lived spikes. Only applicable for data that - // is >= 0. Any values < 0 are treated as no data. While delta metrics - // are accepted by this alignment special care should be taken that the - // values for the metric will always be positive. The output is a gauge - // metric with value type DOUBLE. - PerSeriesAligner string `json:"perSeriesAligner,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AlignmentPeriod") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AlignmentPeriod") 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 *Aggregation) MarshalJSON() ([]byte, error) { - type NoMethod Aggregation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AlertPolicy: A description of the conditions under which some aspect -// of your system is considered to be "unhealthy" and the ways to notify -// people or services about this state. For an overview of alert -// policies, see Introduction to Alerting. -type AlertPolicy struct { - // Combiner: How to combine the results of multiple conditions to - // determine if an incident should be opened. - // - // Possible values: - // "COMBINE_UNSPECIFIED" - An unspecified combiner. - // "AND" - Combine conditions using the logical AND operator. An - // incident is created only if all conditions are met simultaneously. - // This combiner is satisfied if all conditions are met, even if they - // are met on completely different resources. - // "OR" - Combine conditions using the logical OR operator. An - // incident is created if any of the listed conditions is met. - // "AND_WITH_MATCHING_RESOURCE" - Combine conditions using logical AND - // operator, but unlike the regular AND option, an incident is created - // only if all conditions are met simultaneously on at least one - // resource. - Combiner string `json:"combiner,omitempty"` - - // Conditions: A list of conditions for the policy. The conditions are - // combined by AND or OR according to the combiner field. If the - // combined conditions evaluate to true, then an incident is created. A - // policy can have from one to six conditions. - Conditions []*Condition `json:"conditions,omitempty"` - - // CreationRecord: A read-only record of the creation of the alerting - // policy. If provided in a call to create or update, this field will be - // ignored. - CreationRecord *MutationRecord `json:"creationRecord,omitempty"` - - // DisplayName: A short name or phrase used to identify the policy in - // dashboards, notifications, and incidents. To avoid confusion, don't - // use the same display name for multiple policies in the same project. - // The name is limited to 512 Unicode characters. - DisplayName string `json:"displayName,omitempty"` - - // Documentation: Documentation that is included with notifications and - // incidents related to this policy. Best practice is for the - // documentation to include information to help responders understand, - // mitigate, escalate, and correct the underlying problems detected by - // the alerting policy. Notification channels that have limited capacity - // might not show this documentation. - Documentation *Documentation `json:"documentation,omitempty"` - - // Enabled: Whether or not the policy is enabled. On write, the default - // interpretation if unset is that the policy is enabled. On read, - // clients should not make any assumption about the state if it has not - // been populated. The field should always be populated on List and Get - // operations, unless a field projection has been specified that strips - // it out. - Enabled bool `json:"enabled,omitempty"` - - // MutationRecord: A read-only record of the most recent change to the - // alerting policy. If provided in a call to create or update, this - // field will be ignored. - MutationRecord *MutationRecord `json:"mutationRecord,omitempty"` - - // Name: Required if the policy exists. The resource name for this - // policy. The syntax - // is: - // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] - // [ALERT_POLIC - // Y_ID] is assigned by Stackdriver Monitoring when the policy is - // created. When calling the alertPolicies.create method, do not include - // the name field in the alerting policy passed as part of the request. - Name string `json:"name,omitempty"` - - // NotificationChannels: Identifies the notification channels to which - // notifications should be sent when incidents are opened or closed or - // when new violations occur on an already opened incident. Each element - // of this array corresponds to the name field in each of the - // NotificationChannel objects that are returned from the - // ListNotificationChannels method. The syntax of the entries in this - // field is: - // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] - // - NotificationChannels []string `json:"notificationChannels,omitempty"` - - // UserLabels: User-supplied key/value data to be used for organizing - // and identifying the AlertPolicy objects.The field can contain up to - // 64 entries. Each key and value is limited to 63 Unicode characters or - // 128 bytes, whichever is smaller. Labels and values can contain only - // lowercase letters, numerals, underscores, and dashes. Keys must begin - // with a letter. - UserLabels map[string]string `json:"userLabels,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Combiner") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Combiner") 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 *AlertPolicy) MarshalJSON() ([]byte, error) { - type NoMethod AlertPolicy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BasicAuthentication: A type of authentication to perform against the -// specified resource or URL that uses username and password. Currently, -// only Basic authentication is supported in Uptime Monitoring. -type BasicAuthentication struct { - // Password: The password to authenticate. - Password string `json:"password,omitempty"` - - // Username: The username to authenticate. - Username string `json:"username,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Password") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Password") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BasicAuthentication) MarshalJSON() ([]byte, error) { - type NoMethod BasicAuthentication - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BucketOptions: BucketOptions describes the bucket boundaries used to -// create a histogram for the distribution. The buckets can be in a -// linear sequence, an exponential sequence, or each bucket can be -// specified explicitly. BucketOptions does not include the number of -// values in each bucket.A bucket has an inclusive lower bound and -// exclusive upper bound for the values that are counted for that -// bucket. The upper bound of a bucket must be strictly greater than the -// lower bound. The sequence of N buckets for a distribution consists of -// an underflow bucket (number 0), zero or more finite buckets (number 1 -// through N - 2) and an overflow bucket (number N - 1). The buckets are -// contiguous: the lower bound of bucket i (i > 0) is the same as the -// upper bound of bucket i - 1. The buckets span the whole range of -// finite values: lower bound of the underflow bucket is -infinity and -// the upper bound of the overflow bucket is +infinity. The finite -// buckets are so-called because both bounds are finite. -type BucketOptions struct { - // ExplicitBuckets: The explicit buckets. - ExplicitBuckets *Explicit `json:"explicitBuckets,omitempty"` - - // ExponentialBuckets: The exponential buckets. - ExponentialBuckets *Exponential `json:"exponentialBuckets,omitempty"` - - // LinearBuckets: The linear bucket. - LinearBuckets *Linear `json:"linearBuckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExplicitBuckets") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExplicitBuckets") 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 *BucketOptions) MarshalJSON() ([]byte, error) { - type NoMethod BucketOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CollectdPayload: A collection of data points sent from a -// collectd-based plugin. See the collectd documentation for more -// information. -type CollectdPayload struct { - // EndTime: The end time of the interval. - EndTime string `json:"endTime,omitempty"` - - // Metadata: The measurement metadata. Example: "process_id" -> 12345 - Metadata map[string]TypedValue `json:"metadata,omitempty"` - - // Plugin: The name of the plugin. Example: "disk". - Plugin string `json:"plugin,omitempty"` - - // PluginInstance: The instance name of the plugin Example: "hdcl". - PluginInstance string `json:"pluginInstance,omitempty"` - - // StartTime: The start time of the interval. - StartTime string `json:"startTime,omitempty"` - - // Type: The measurement type. Example: "memory". - Type string `json:"type,omitempty"` - - // TypeInstance: The measurement type instance. Example: "used". - TypeInstance string `json:"typeInstance,omitempty"` - - // Values: The measured values during this time interval. Each value - // must have a different dataSourceName. - Values []*CollectdValue `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EndTime") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EndTime") 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 *CollectdPayload) MarshalJSON() ([]byte, error) { - type NoMethod CollectdPayload - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CollectdPayloadError: Describes the error status for payloads that -// were not written. -type CollectdPayloadError struct { - // Error: Records the error status for the payload. If this field is - // present, the partial errors for nested values won't be populated. - Error *Status `json:"error,omitempty"` - - // Index: The zero-based index in - // CreateCollectdTimeSeriesRequest.collectd_payloads. - Index int64 `json:"index,omitempty"` - - // ValueErrors: Records the error status for values that were not - // written due to an error.Failed payloads for which nothing is written - // will not include partial value errors. - ValueErrors []*CollectdValueError `json:"valueErrors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Error") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Error") 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 *CollectdPayloadError) MarshalJSON() ([]byte, error) { - type NoMethod CollectdPayloadError - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CollectdValue: A single data point from a collectd-based plugin. -type CollectdValue struct { - // DataSourceName: The data source for the collectd value. For example - // there are two data sources for network measurements: "rx" and "tx". - DataSourceName string `json:"dataSourceName,omitempty"` - - // DataSourceType: The type of measurement. - // - // Possible values: - // "UNSPECIFIED_DATA_SOURCE_TYPE" - An unspecified data source type. - // This corresponds to - // google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED. - // "GAUGE" - An instantaneous measurement of a varying quantity. This - // corresponds to google.api.MetricDescriptor.MetricKind.GAUGE. - // "COUNTER" - A cumulative value over time. This corresponds to - // google.api.MetricDescriptor.MetricKind.CUMULATIVE. - // "DERIVE" - A rate of change of the measurement. - // "ABSOLUTE" - An amount of change since the last measurement - // interval. This corresponds to - // google.api.MetricDescriptor.MetricKind.DELTA. - DataSourceType string `json:"dataSourceType,omitempty"` - - // Value: The measurement value. - Value *TypedValue `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DataSourceName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DataSourceName") 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 *CollectdValue) MarshalJSON() ([]byte, error) { - type NoMethod CollectdValue - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CollectdValueError: Describes the error status for values that were -// not written. -type CollectdValueError struct { - // Error: Records the error status for the value. - Error *Status `json:"error,omitempty"` - - // Index: The zero-based index in CollectdPayload.values within the - // parent CreateCollectdTimeSeriesRequest.collectd_payloads. - Index int64 `json:"index,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Error") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Error") 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 *CollectdValueError) MarshalJSON() ([]byte, error) { - type NoMethod CollectdValueError - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Condition: A condition is a true/false test that determines when an -// alerting policy should open an incident. If a condition evaluates to -// true, it signifies that something is wrong. -type Condition struct { - // ConditionAbsent: A condition that checks that a time series continues - // to receive new data points. - ConditionAbsent *MetricAbsence `json:"conditionAbsent,omitempty"` - - // ConditionThreshold: A condition that compares a time series against a - // threshold. - ConditionThreshold *MetricThreshold `json:"conditionThreshold,omitempty"` - - // DisplayName: A short name or phrase used to identify the condition in - // dashboards, notifications, and incidents. To avoid confusion, don't - // use the same display name for multiple conditions in the same policy. - DisplayName string `json:"displayName,omitempty"` - - // Name: Required if the condition exists. The unique resource name for - // this condition. Its syntax - // is: - // projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDIT - // ION_ID] - // [CONDITION_ID] is assigned by Stackdriver Monitoring when the - // condition is created as part of a new or updated alerting policy.When - // calling the alertPolicies.create method, do not include the name - // field in the conditions of the requested alerting policy. Stackdriver - // Monitoring creates the condition identifiers and includes them in the - // new policy.When calling the alertPolicies.update method to update a - // policy, including a condition name causes the existing condition to - // be updated. Conditions without names are added to the updated policy. - // Existing conditions are deleted if they are not updated.Best practice - // is to preserve [CONDITION_ID] if you make only small changes, such as - // those to condition thresholds, durations, or trigger values. - // Otherwise, treat the change as a new condition and let the existing - // condition be deleted. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConditionAbsent") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ConditionAbsent") 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 *Condition) MarshalJSON() ([]byte, error) { - type NoMethod Condition - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ContentMatcher: Used to perform string matching. It allows substring -// and regular expressions, together with their negations. -type ContentMatcher struct { - // Content: String or regex content to match (max 1024 bytes) - Content string `json:"content,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Content") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Content") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ContentMatcher) MarshalJSON() ([]byte, error) { - type NoMethod ContentMatcher - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CreateCollectdTimeSeriesRequest: The CreateCollectdTimeSeries -// request. -type CreateCollectdTimeSeriesRequest struct { - // CollectdPayloads: The collectd payloads representing the time series - // data. You must not include more than a single point for each time - // series, so no two payloads can have the same values for all of the - // fields plugin, plugin_instance, type, and type_instance. - CollectdPayloads []*CollectdPayload `json:"collectdPayloads,omitempty"` - - // CollectdVersion: The version of collectd that collected the data. - // Example: "5.3.0-192.el6". - CollectdVersion string `json:"collectdVersion,omitempty"` - - // Resource: The monitored resource associated with the time series. - Resource *MonitoredResource `json:"resource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CollectdPayloads") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CollectdPayloads") 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 *CreateCollectdTimeSeriesRequest) MarshalJSON() ([]byte, error) { - type NoMethod CreateCollectdTimeSeriesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CreateCollectdTimeSeriesResponse: The CreateCollectdTimeSeries -// response. -type CreateCollectdTimeSeriesResponse struct { - // PayloadErrors: Records the error status for points that were not - // written due to an error.Failed requests for which nothing is written - // will return an error response instead. - PayloadErrors []*CollectdPayloadError `json:"payloadErrors,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "PayloadErrors") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PayloadErrors") 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 *CreateCollectdTimeSeriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod CreateCollectdTimeSeriesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CreateTimeSeriesRequest: The CreateTimeSeries request. -type CreateTimeSeriesRequest struct { - // TimeSeries: The new data to be added to a list of time series. Adds - // at most one data point to each of several time series. The new data - // point must be more recent than any other point in its time series. - // Each TimeSeries value must fully specify a unique time series by - // supplying all label values for the metric and the monitored resource. - TimeSeries []*TimeSeries `json:"timeSeries,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TimeSeries") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TimeSeries") 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 *CreateTimeSeriesRequest) MarshalJSON() ([]byte, error) { - type NoMethod CreateTimeSeriesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Distribution: Distribution contains summary statistics for a -// population of values. It optionally contains a histogram representing -// the distribution of those values across a set of buckets.The summary -// statistics are the count, mean, sum of the squared deviation from the -// mean, the minimum, and the maximum of the set of population of -// values. The histogram is based on a sequence of buckets and gives a -// count of values that fall into each bucket. The boundaries of the -// buckets are given either explicitly or by formulas for buckets of -// fixed or exponentially increasing widths.Although it is not -// forbidden, it is generally a bad idea to include non-finite values -// (infinities or NaNs) in the population of values, as this will render -// the mean and sum_of_squared_deviation fields meaningless. -type Distribution struct { - // BucketCounts: Required in the Stackdriver Monitoring API v3. The - // values for each bucket specified in bucket_options. The sum of the - // values in bucketCounts must equal the value in the count field of the - // Distribution object. The order of the bucket counts follows the - // numbering schemes described for the three bucket types. The underflow - // bucket has number 0; the finite buckets, if any, have numbers 1 - // through N-2; and the overflow bucket has number N-1. The size of - // bucket_counts must not be greater than N. If the size is less than N, - // then the remaining buckets are assigned values of zero. - BucketCounts googleapi.Int64s `json:"bucketCounts,omitempty"` - - // BucketOptions: Required in the Stackdriver Monitoring API v3. Defines - // the histogram bucket boundaries. - BucketOptions *BucketOptions `json:"bucketOptions,omitempty"` - - // Count: The number of values in the population. Must be non-negative. - // This value must equal the sum of the values in bucket_counts if a - // histogram is provided. - Count int64 `json:"count,omitempty,string"` - - // Exemplars: Must be in increasing order of value field. - Exemplars []*Exemplar `json:"exemplars,omitempty"` - - // Mean: The arithmetic mean of the values in the population. If count - // is zero then this field must be zero. - Mean float64 `json:"mean,omitempty"` - - // Range: If specified, contains the range of the population values. The - // field must not be present if the count is zero. This field is - // presently ignored by the Stackdriver Monitoring API v3. - Range *Range `json:"range,omitempty"` - - // SumOfSquaredDeviation: The sum of squared deviations from the mean of - // the values in the population. For values x_i this - // is: - // Sum[i=1..n]((x_i - mean)^2) - // Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd - // edition describes Welford's method for accumulating this sum in one - // pass.If count is zero then this field must be zero. - SumOfSquaredDeviation float64 `json:"sumOfSquaredDeviation,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BucketCounts") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BucketCounts") 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 *Distribution) MarshalJSON() ([]byte, error) { - type NoMethod Distribution - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Distribution) UnmarshalJSON(data []byte) error { - type NoMethod Distribution - var s1 struct { - Mean gensupport.JSONFloat64 `json:"mean"` - SumOfSquaredDeviation gensupport.JSONFloat64 `json:"sumOfSquaredDeviation"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Mean = float64(s1.Mean) - s.SumOfSquaredDeviation = float64(s1.SumOfSquaredDeviation) - return nil -} - -// Documentation: A content string and a MIME type that describes the -// content string's format. -type Documentation struct { - // Content: The text of the documentation, interpreted according to - // mime_type. The content may not exceed 8,192 Unicode characters and - // may not exceed more than 10,240 bytes when encoded in UTF-8 format, - // whichever is smaller. - Content string `json:"content,omitempty"` - - // MimeType: The format of the content field. Presently, only the value - // "text/markdown" is supported. See Markdown - // (https://en.wikipedia.org/wiki/Markdown) for more information. - MimeType string `json:"mimeType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Content") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Content") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Documentation) MarshalJSON() ([]byte, error) { - type NoMethod Documentation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DroppedLabels: A set of (label, value) pairs which were dropped -// during aggregation, attached to google.api.Distribution.Exemplars in -// google.api.Distribution values during aggregation.These values are -// used in combination with the label values that remain on the -// aggregated Distribution timeseries to construct the full label set -// for the exemplar values. The resulting full label set may be used to -// identify the specific task/job/instance (for example) which may be -// contributing to a long-tail, while allowing the storage savings of -// only storing aggregated distribution values for a large group.Note -// that there are no guarantees on ordering of the labels from -// exemplar-to-exemplar and from distribution-to-distribution in the -// same stream, and there may be duplicates. It is up to clients to -// resolve any ambiguities. -type DroppedLabels struct { - // Label: Map from label to its value, for all labels dropped in any - // aggregation. - Label map[string]string `json:"label,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Label") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Label") 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 *DroppedLabels) MarshalJSON() ([]byte, error) { - type NoMethod DroppedLabels - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Empty: A generic empty message that you can re-use to avoid defining -// duplicated empty messages in your APIs. A typical example is to use -// it as the request or the response type of an API method. For -// instance: -// service Foo { -// rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); -// } -// The JSON representation for Empty is empty JSON object {}. -type Empty struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - -// Exemplar: Exemplars are example points that may be used to annotate -// aggregated distribution values. They are metadata that gives -// information about a particular value added to a Distribution bucket, -// such as a trace ID that was active when a value was added. They may -// contain further information, such as a example values and timestamps, -// origin, etc. -type Exemplar struct { - // Attachments: Contextual information about the example value. Examples - // are:Trace ID: - // type.googleapis.com/google.devtools.cloudtrace.v1.TraceLiteral - // string: type.googleapis.com/google.protobuf.StringValueLabels dropped - // during aggregation: - // type.googleapis.com/google.monitoring.v3.DroppedLabelsThere may be - // only a single attachment of any given message type in a single - // exemplar, and this is enforced by the system. - Attachments []googleapi.RawMessage `json:"attachments,omitempty"` - - // Timestamp: The observation (sampling) time of the above value. - Timestamp string `json:"timestamp,omitempty"` - - // Value: Value of the exemplar point. This value determines to which - // bucket the exemplar belongs. - Value float64 `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Attachments") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Attachments") 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 *Exemplar) MarshalJSON() ([]byte, error) { - type NoMethod Exemplar - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Exemplar) UnmarshalJSON(data []byte) error { - type NoMethod Exemplar - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -// Explicit: Specifies a set of buckets with arbitrary widths.There are -// size(bounds) + 1 (= N) buckets. Bucket i has the following -// boundaries:Upper bound (0 <= i < N-1): boundsi Lower bound (1 <= i < -// N); boundsi - 1The bounds field must contain at least one element. If -// bounds has only one element, then there are no finite buckets, and -// that single element is the common boundary of the overflow and -// underflow buckets. -type Explicit struct { - // Bounds: The values must be monotonically increasing. - Bounds []float64 `json:"bounds,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Bounds") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Bounds") 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 *Explicit) MarshalJSON() ([]byte, error) { - type NoMethod Explicit - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Exponential: Specifies an exponential sequence of buckets that have a -// width that is proportional to the value of the lower bound. Each -// bucket represents a constant relative uncertainty on a specific value -// in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket -// i has the following boundaries:Upper bound (0 <= i < N-1): scale * -// (growth_factor ^ i). Lower bound (1 <= i < N): scale * -// (growth_factor ^ (i - 1)). -type Exponential struct { - // GrowthFactor: Must be greater than 1. - GrowthFactor float64 `json:"growthFactor,omitempty"` - - // NumFiniteBuckets: Must be greater than 0. - NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"` - - // Scale: Must be greater than 0. - Scale float64 `json:"scale,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GrowthFactor") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GrowthFactor") 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 *Exponential) MarshalJSON() ([]byte, error) { - type NoMethod Exponential - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Exponential) UnmarshalJSON(data []byte) error { - type NoMethod Exponential - var s1 struct { - GrowthFactor gensupport.JSONFloat64 `json:"growthFactor"` - Scale gensupport.JSONFloat64 `json:"scale"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.GrowthFactor = float64(s1.GrowthFactor) - s.Scale = float64(s1.Scale) - return nil -} - -// Field: A single field of a message type. -type Field struct { - // Cardinality: The field cardinality. - // - // Possible values: - // "CARDINALITY_UNKNOWN" - For fields with unknown cardinality. - // "CARDINALITY_OPTIONAL" - For optional fields. - // "CARDINALITY_REQUIRED" - For required fields. Proto2 syntax only. - // "CARDINALITY_REPEATED" - For repeated fields. - Cardinality string `json:"cardinality,omitempty"` - - // DefaultValue: The string value of the default value of this field. - // Proto2 syntax only. - DefaultValue string `json:"defaultValue,omitempty"` - - // JsonName: The field JSON name. - JsonName string `json:"jsonName,omitempty"` - - // Kind: The field type. - // - // Possible values: - // "TYPE_UNKNOWN" - Field type unknown. - // "TYPE_DOUBLE" - Field type double. - // "TYPE_FLOAT" - Field type float. - // "TYPE_INT64" - Field type int64. - // "TYPE_UINT64" - Field type uint64. - // "TYPE_INT32" - Field type int32. - // "TYPE_FIXED64" - Field type fixed64. - // "TYPE_FIXED32" - Field type fixed32. - // "TYPE_BOOL" - Field type bool. - // "TYPE_STRING" - Field type string. - // "TYPE_GROUP" - Field type group. Proto2 syntax only, and - // deprecated. - // "TYPE_MESSAGE" - Field type message. - // "TYPE_BYTES" - Field type bytes. - // "TYPE_UINT32" - Field type uint32. - // "TYPE_ENUM" - Field type enum. - // "TYPE_SFIXED32" - Field type sfixed32. - // "TYPE_SFIXED64" - Field type sfixed64. - // "TYPE_SINT32" - Field type sint32. - // "TYPE_SINT64" - Field type sint64. - Kind string `json:"kind,omitempty"` - - // Name: The field name. - Name string `json:"name,omitempty"` - - // Number: The field number. - Number int64 `json:"number,omitempty"` - - // OneofIndex: The index of the field type in Type.oneofs, for message - // or enumeration types. The first type has index 1; zero means the type - // is not in the list. - OneofIndex int64 `json:"oneofIndex,omitempty"` - - // Options: The protocol buffer options. - Options []*Option `json:"options,omitempty"` - - // Packed: Whether to use alternative packed wire representation. - Packed bool `json:"packed,omitempty"` - - // TypeUrl: The field type URL, without the scheme, for message or - // enumeration types. Example: - // "type.googleapis.com/google.protobuf.Timestamp". - TypeUrl string `json:"typeUrl,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Cardinality") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Cardinality") 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 *Field) MarshalJSON() ([]byte, error) { - type NoMethod Field - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GetNotificationChannelVerificationCodeRequest: The -// GetNotificationChannelVerificationCode request. -type GetNotificationChannelVerificationCodeRequest struct { - // ExpireTime: The desired expiration time. If specified, the API will - // guarantee that the returned code will not be valid after the - // specified timestamp; however, the API cannot guarantee that the - // returned code will be valid for at least as long as the requested - // time (the API puts an upper bound on the amount of time for which a - // code may be valid). If omitted, a default expiration will be used, - // which may be less than the max permissible expiration (so specifying - // an expiration may extend the code's lifetime over omitting an - // expiration, even though the API does impose an upper limit on the - // maximum expiration that is permitted). - ExpireTime string `json:"expireTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExpireTime") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExpireTime") 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 *GetNotificationChannelVerificationCodeRequest) MarshalJSON() ([]byte, error) { - type NoMethod GetNotificationChannelVerificationCodeRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GetNotificationChannelVerificationCodeResponse: The -// GetNotificationChannelVerificationCode request. -type GetNotificationChannelVerificationCodeResponse struct { - // Code: The verification code, which may be used to verify other - // channels that have an equivalent identity (i.e. other channels of the - // same type with the same fingerprint such as other email channels with - // the same email address or other sms channels with the same number). - Code string `json:"code,omitempty"` - - // ExpireTime: The expiration time associated with the code that was - // returned. If an expiration was provided in the request, this is the - // minimum of the requested expiration in the request and the max - // permitted expiration. - ExpireTime string `json:"expireTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "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 *GetNotificationChannelVerificationCodeResponse) MarshalJSON() ([]byte, error) { - type NoMethod GetNotificationChannelVerificationCodeResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Group: The description of a dynamic collection of monitored -// resources. Each group has a filter that is matched against monitored -// resources and their associated metadata. If a group's filter matches -// an available monitored resource, then that resource is a member of -// that group. Groups can contain any number of monitored resources, and -// each monitored resource can be a member of any number of -// groups.Groups can be nested in parent-child hierarchies. The -// parentName field identifies an optional parent for each group. If a -// group has a parent, then the only monitored resources available to be -// matched by the group's filter are the resources contained in the -// parent group. In other words, a group contains the monitored -// resources that match its filter and the filters of all the group's -// ancestors. A group without a parent can contain any monitored -// resource.For example, consider an infrastructure running a set of -// instances with two user-defined tags: "environment" and "role". A -// parent group has a filter, environment="production". A child of that -// parent group has a filter, role="transcoder". The parent group -// contains all instances in the production environment, regardless of -// their roles. The child group contains instances that have the -// transcoder role and are in the production environment.The monitored -// resources contained in a group can change at any moment, depending on -// what resources exist and what filters are associated with the group -// and its ancestors. -type Group struct { - // DisplayName: A user-assigned name for this group, used only for - // display purposes. - DisplayName string `json:"displayName,omitempty"` - - // Filter: The filter used to determine which monitored resources belong - // to this group. - Filter string `json:"filter,omitempty"` - - // IsCluster: If true, the members of this group are considered to be a - // cluster. The system can perform additional analysis on groups that - // are clusters. - IsCluster bool `json:"isCluster,omitempty"` - - // Name: Output only. The name of this group. The format is - // "projects/{project_id_or_number}/groups/{group_id}". When creating a - // group, this field is ignored and a new name is created consisting of - // the project specified in the call to CreateGroup and a unique - // {group_id} that is generated automatically. - Name string `json:"name,omitempty"` - - // ParentName: The name of the group's parent, if it has one. The format - // is "projects/{project_id_or_number}/groups/{group_id}". For groups - // with no parent, parentName is the empty string, "". - ParentName string `json:"parentName,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "DisplayName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DisplayName") 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 *Group) MarshalJSON() ([]byte, error) { - type NoMethod Group - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpCheck: Information involved in an HTTP/HTTPS uptime check -// request. -type HttpCheck struct { - // AuthInfo: The authentication information. Optional when creating an - // HTTP check; defaults to empty. - AuthInfo *BasicAuthentication `json:"authInfo,omitempty"` - - // Headers: The list of headers to send as part of the uptime check - // request. If two headers have the same key and different values, they - // should be entered as a single header, with the value being a - // comma-separated list of all the desired values as described at - // https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). Entering - // two separate headers with the same key in a Create call will cause - // the first to be overwritten by the second. The maximum number of - // headers allowed is 100. - Headers map[string]string `json:"headers,omitempty"` - - // MaskHeaders: Boolean specifiying whether to encrypt the header - // information. Encryption should be specified for any headers related - // to authentication that you do not wish to be seen when retrieving the - // configuration. The server will be responsible for encrypting the - // headers. On Get/List calls, if mask_headers is set to True then the - // headers will be obscured with ******. - MaskHeaders bool `json:"maskHeaders,omitempty"` - - // Path: The path to the page to run the check against. Will be combined - // with the host (specified within the MonitoredResource) and port to - // construct the full URL. Optional (defaults to "/"). - Path string `json:"path,omitempty"` - - // Port: The port to the page to run the check against. Will be combined - // with host (specified within the MonitoredResource) and path to - // construct the full URL. Optional (defaults to 80 without SSL, or 443 - // with SSL). - Port int64 `json:"port,omitempty"` - - // UseSsl: If true, use HTTPS instead of HTTP to run the check. - UseSsl bool `json:"useSsl,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuthInfo") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AuthInfo") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HttpCheck) MarshalJSON() ([]byte, error) { - type NoMethod HttpCheck - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InternalChecker: An internal checker allows uptime checks to run on -// private/internal GCP resources. -type InternalChecker struct { - // DisplayName: The checker's human-readable name. The display name - // should be unique within a Stackdriver Workspace in order to make it - // easier to identify; however, uniqueness is not enforced. - DisplayName string `json:"displayName,omitempty"` - - // GcpZone: The GCP zone the uptime check should egress from. Only - // respected for internal uptime checks, where internal_network is - // specified. - GcpZone string `json:"gcpZone,omitempty"` - - // Name: A unique resource name for this InternalChecker. The format - // is:projects/[PROJECT_ID]/internalCheckers/[CHECKER_ID].PROJECT_ID is - // the GCP project ID where the internal resource lives. Not necessarily - // the same as the project_id for the config. - Name string `json:"name,omitempty"` - - // Network: The GCP VPC network (https://cloud.google.com/vpc/docs/vpc) - // where the internal resource lives (ex: "default"). - Network string `json:"network,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DisplayName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InternalChecker) MarshalJSON() ([]byte, error) { - type NoMethod InternalChecker - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LabelDescriptor: A description of a label. -type LabelDescriptor struct { - // Description: A human-readable description for the label. - Description string `json:"description,omitempty"` - - // Key: The label key. - Key string `json:"key,omitempty"` - - // ValueType: The type of data that can be assigned to the label. - // - // Possible values: - // "STRING" - A variable-length string. This is the default. - // "BOOL" - Boolean; true or false. - // "INT64" - A 64-bit signed integer. - ValueType string `json:"valueType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LabelDescriptor) MarshalJSON() ([]byte, error) { - type NoMethod LabelDescriptor - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Linear: Specifies a linear sequence of buckets that all have the same -// width (except overflow and underflow). Each bucket represents a -// constant absolute uncertainty on the specific value in the -// bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has -// the following boundaries:Upper bound (0 <= i < N-1): offset + (width -// * i). Lower bound (1 <= i < N): offset + (width * (i - 1)). -type Linear struct { - // NumFiniteBuckets: Must be greater than 0. - NumFiniteBuckets int64 `json:"numFiniteBuckets,omitempty"` - - // Offset: Lower bound of the first bucket. - Offset float64 `json:"offset,omitempty"` - - // Width: Must be greater than 0. - Width float64 `json:"width,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NumFiniteBuckets") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NumFiniteBuckets") 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 *Linear) MarshalJSON() ([]byte, error) { - type NoMethod Linear - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Linear) UnmarshalJSON(data []byte) error { - type NoMethod Linear - var s1 struct { - Offset gensupport.JSONFloat64 `json:"offset"` - Width gensupport.JSONFloat64 `json:"width"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Offset = float64(s1.Offset) - s.Width = float64(s1.Width) - return nil -} - -// ListAlertPoliciesResponse: The protocol for the ListAlertPolicies -// response. -type ListAlertPoliciesResponse struct { - // AlertPolicies: The returned alert policies. - AlertPolicies []*AlertPolicy `json:"alertPolicies,omitempty"` - - // NextPageToken: If there might be more results than were returned, - // then this field is set to a non-empty value. To see the additional - // results, use that value as pageToken in the next call to this method. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AlertPolicies") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AlertPolicies") 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 *ListAlertPoliciesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListAlertPoliciesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListGroupMembersResponse: The ListGroupMembers response. -type ListGroupMembersResponse struct { - // Members: A set of monitored resources in the group. - Members []*MonitoredResource `json:"members,omitempty"` - - // NextPageToken: If there are more results than have been returned, - // then this field is set to a non-empty value. To see the additional - // results, use that value as pageToken in the next call to this method. - NextPageToken string `json:"nextPageToken,omitempty"` - - // TotalSize: The total number of elements matching this request. - TotalSize int64 `json:"totalSize,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Members") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Members") 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 *ListGroupMembersResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListGroupMembersResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListGroupsResponse: The ListGroups response. -type ListGroupsResponse struct { - // Group: The groups that match the specified filters. - Group []*Group `json:"group,omitempty"` - - // NextPageToken: If there are more results than have been returned, - // then this field is set to a non-empty value. To see the additional - // results, use that value as pageToken in the next call to this method. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Group") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Group") 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 *ListGroupsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListGroupsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListMetricDescriptorsResponse: The ListMetricDescriptors response. -type ListMetricDescriptorsResponse struct { - // MetricDescriptors: The metric descriptors that are available to the - // project and that match the value of filter, if present. - MetricDescriptors []*MetricDescriptor `json:"metricDescriptors,omitempty"` - - // NextPageToken: If there are more results than have been returned, - // then this field is set to a non-empty value. To see the additional - // results, use that value as pageToken in the next call to this method. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "MetricDescriptors") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MetricDescriptors") 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 *ListMetricDescriptorsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMetricDescriptorsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListMonitoredResourceDescriptorsResponse: The -// ListMonitoredResourceDescriptors response. -type ListMonitoredResourceDescriptorsResponse struct { - // NextPageToken: If there are more results than have been returned, - // then this field is set to a non-empty value. To see the additional - // results, use that value as pageToken in the next call to this method. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ResourceDescriptors: The monitored resource descriptors that are - // available to this project and that match filter, if present. - ResourceDescriptors []*MonitoredResourceDescriptor `json:"resourceDescriptors,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListMonitoredResourceDescriptorsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMonitoredResourceDescriptorsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListNotificationChannelDescriptorsResponse: The -// ListNotificationChannelDescriptors response. -type ListNotificationChannelDescriptorsResponse struct { - // ChannelDescriptors: The monitored resource descriptors supported for - // the specified project, optionally filtered. - ChannelDescriptors []*NotificationChannelDescriptor `json:"channelDescriptors,omitempty"` - - // NextPageToken: If not empty, indicates that there may be more results - // that match the request. Use the value in the page_token field in a - // subsequent request to fetch the next set of results. If empty, all - // results have been returned. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ChannelDescriptors") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ChannelDescriptors") 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 *ListNotificationChannelDescriptorsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListNotificationChannelDescriptorsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListNotificationChannelsResponse: The ListNotificationChannels -// response. -type ListNotificationChannelsResponse struct { - // NextPageToken: If not empty, indicates that there may be more results - // that match the request. Use the value in the page_token field in a - // subsequent request to fetch the next set of results. If empty, all - // results have been returned. - NextPageToken string `json:"nextPageToken,omitempty"` - - // NotificationChannels: The notification channels defined for the - // specified project. - NotificationChannels []*NotificationChannel `json:"notificationChannels,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListNotificationChannelsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListNotificationChannelsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListTimeSeriesResponse: The ListTimeSeries response. -type ListTimeSeriesResponse struct { - // ExecutionErrors: Query execution errors that may have caused the time - // series data returned to be incomplete. - ExecutionErrors []*Status `json:"executionErrors,omitempty"` - - // NextPageToken: If there are more results than have been returned, - // then this field is set to a non-empty value. To see the additional - // results, use that value as pageToken in the next call to this method. - NextPageToken string `json:"nextPageToken,omitempty"` - - // TimeSeries: One or more time series that match the filter included in - // the request. - TimeSeries []*TimeSeries `json:"timeSeries,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ExecutionErrors") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExecutionErrors") 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 *ListTimeSeriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListTimeSeriesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListUptimeCheckConfigsResponse: The protocol for the -// ListUptimeCheckConfigs response. -type ListUptimeCheckConfigsResponse struct { - // NextPageToken: This field represents the pagination token to retrieve - // the next page of results. If the value is empty, it means no further - // results for the request. To retrieve the next page of results, the - // value of the next_page_token is passed to the subsequent List method - // call (in the request message's page_token field). - NextPageToken string `json:"nextPageToken,omitempty"` - - // TotalSize: The total number of uptime check configurations for the - // project, irrespective of any pagination. - TotalSize int64 `json:"totalSize,omitempty"` - - // UptimeCheckConfigs: The returned uptime check configurations. - UptimeCheckConfigs []*UptimeCheckConfig `json:"uptimeCheckConfigs,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListUptimeCheckConfigsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListUptimeCheckConfigsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListUptimeCheckIpsResponse: The protocol for the ListUptimeCheckIps -// response. -type ListUptimeCheckIpsResponse struct { - // NextPageToken: This field represents the pagination token to retrieve - // the next page of results. If the value is empty, it means no further - // results for the request. To retrieve the next page of results, the - // value of the next_page_token is passed to the subsequent List method - // call (in the request message's page_token field). NOTE: this field is - // not yet implemented - NextPageToken string `json:"nextPageToken,omitempty"` - - // UptimeCheckIps: The returned list of IP addresses (including region - // and location) that the checkers run from. - UptimeCheckIps []*UptimeCheckIp `json:"uptimeCheckIps,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListUptimeCheckIpsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListUptimeCheckIpsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Metric: A specific metric, identified by specifying values for all of -// the labels of a MetricDescriptor. -type Metric struct { - // Labels: The set of label values that uniquely identify this metric. - // All labels listed in the MetricDescriptor must be assigned values. - Labels map[string]string `json:"labels,omitempty"` - - // Type: An existing metric type, see google.api.MetricDescriptor. For - // example, custom.googleapis.com/invoice/paid/amount. - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Labels") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Labels") 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 *Metric) MarshalJSON() ([]byte, error) { - type NoMethod Metric - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MetricAbsence: A condition type that checks that monitored resources -// are reporting data. The configuration defines a metric and a set of -// monitored resources. The predicate is considered in violation when a -// time series for the specified metric of a monitored resource does not -// include any data in the specified duration. -type MetricAbsence struct { - // Aggregations: Specifies the alignment of data points in individual - // time series as well as how to combine the retrieved time series - // together (such as when aggregating multiple streams on each resource - // to a single stream for each resource or when aggregating streams - // across all members of a group of resrouces). Multiple aggregations - // are applied in the order specified.This field is similar to the one - // in the MetricService.ListTimeSeries request. It is advisable to use - // the ListTimeSeries method when debugging this field. - Aggregations []*Aggregation `json:"aggregations,omitempty"` - - // Duration: The amount of time that a time series must fail to report - // new data to be considered failing. Currently, only values that are a - // multiple of a minute--e.g. 60, 120, or 300 seconds--are supported. If - // an invalid value is given, an error will be returned. The - // Duration.nanos field is ignored. - Duration string `json:"duration,omitempty"` - - // Filter: A filter that identifies which time series should be compared - // with the threshold.The filter is similar to the one that is specified - // in the MetricService.ListTimeSeries request (that call is useful to - // verify the time series that will be retrieved / processed) and must - // specify the metric type and optionally may contain restrictions on - // resource type, resource labels, and metric labels. This field may not - // exceed 2048 Unicode characters in length. - Filter string `json:"filter,omitempty"` - - // Trigger: The number/percent of time series for which the comparison - // must hold in order for the condition to trigger. If unspecified, then - // the condition will trigger if the comparison is true for any of the - // time series that have been identified by filter and aggregations. - Trigger *Trigger `json:"trigger,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Aggregations") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Aggregations") 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 *MetricAbsence) MarshalJSON() ([]byte, error) { - type NoMethod MetricAbsence - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MetricDescriptor: Defines a metric type and its schema. Once a metric -// descriptor is created, deleting or altering it stops data collection -// and makes the metric type's existing data unusable. -type MetricDescriptor struct { - // Description: A detailed description of the metric, which can be used - // in documentation. - Description string `json:"description,omitempty"` - - // DisplayName: A concise name for the metric, which can be displayed in - // user interfaces. Use sentence case without an ending period, for - // example "Request count". This field is optional but it is recommended - // to be set for any metrics associated with user-visible concepts, such - // as Quota. - DisplayName string `json:"displayName,omitempty"` - - // Labels: The set of labels that can be used to describe a specific - // instance of this metric type. For example, the - // appengine.googleapis.com/http/server/response_latencies metric type - // has a label for the HTTP response code, response_code, so you can - // look at latencies for successful responses or just for responses that - // failed. - Labels []*LabelDescriptor `json:"labels,omitempty"` - - // Metadata: Optional. Metadata which can be used to guide usage of the - // metric. - Metadata *MetricDescriptorMetadata `json:"metadata,omitempty"` - - // MetricKind: Whether the metric records instantaneous values, changes - // to a value, etc. Some combinations of metric_kind and value_type - // might not be supported. - // - // Possible values: - // "METRIC_KIND_UNSPECIFIED" - Do not use this default value. - // "GAUGE" - An instantaneous measurement of a value. - // "DELTA" - The change in a value during a time interval. - // "CUMULATIVE" - A value accumulated over a time interval. Cumulative - // measurements in a time series should have the same start time and - // increasing end times, until an event resets the cumulative value to - // zero and sets a new start time for the following points. - MetricKind string `json:"metricKind,omitempty"` - - // Name: The resource name of the metric descriptor. - Name string `json:"name,omitempty"` - - // Type: The metric type, including its DNS name prefix. The type is not - // URL-encoded. All user-defined metric types have the DNS name - // custom.googleapis.com or external.googleapis.com. Metric types should - // use a natural hierarchical grouping. For - // example: - // "custom.googleapis.com/invoice/paid/amount" - // "external.googlea - // pis.com/prometheus/up" - // "appengine.googleapis.com/http/server/response_ - // latencies" - // - Type string `json:"type,omitempty"` - - // Unit: The unit in which the metric value is reported. It is only - // applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The - // supported units are a subset of The Unified Code for Units of Measure - // (http://unitsofmeasure.org/ucum.html) standard:Basic units (UNIT) - // bit bit - // By byte - // s second - // min minute - // h hour - // d dayPrefixes (PREFIX) - // k kilo (10**3) - // M mega (10**6) - // G giga (10**9) - // T tera (10**12) - // P peta (10**15) - // E exa (10**18) - // Z zetta (10**21) - // Y yotta (10**24) - // m milli (10**-3) - // u micro (10**-6) - // n nano (10**-9) - // p pico (10**-12) - // f femto (10**-15) - // a atto (10**-18) - // z zepto (10**-21) - // y yocto (10**-24) - // Ki kibi (2**10) - // Mi mebi (2**20) - // Gi gibi (2**30) - // Ti tebi (2**40)GrammarThe grammar also includes these connectors: - // / division (as an infix operator, e.g. 1/s). - // . multiplication (as an infix operator, e.g. GBy.d)The grammar for a - // unit is as follows: - // Expression = Component { "." Component } { "/" Component } - // ; - // - // Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] - // | Annotation - // | "1" - // ; - // - // Annotation = "{" NAME "}" ; - // Notes: - // Annotation is just a comment if it follows a UNIT and is equivalent - // to 1 if it is used alone. For examples, {requests}/s == 1/s, - // By{transmitted}/s == By/s. - // NAME is a sequence of non-blank printable ASCII characters not - // containing '{' or '}'. - // 1 represents dimensionless value 1, such as in 1/s. - // % represents dimensionless value 1/100, and annotates values giving - // a percentage. - Unit string `json:"unit,omitempty"` - - // ValueType: Whether the measurement is an integer, a floating-point - // number, etc. Some combinations of metric_kind and value_type might - // not be supported. - // - // Possible values: - // "VALUE_TYPE_UNSPECIFIED" - Do not use this default value. - // "BOOL" - The value is a boolean. This value type can be used only - // if the metric kind is GAUGE. - // "INT64" - The value is a signed 64-bit integer. - // "DOUBLE" - The value is a double precision floating point number. - // "STRING" - The value is a text string. This value type can be used - // only if the metric kind is GAUGE. - // "DISTRIBUTION" - The value is a Distribution. - // "MONEY" - The value is money. - ValueType string `json:"valueType,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MetricDescriptor) MarshalJSON() ([]byte, error) { - type NoMethod MetricDescriptor - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MetricDescriptorMetadata: Additional annotations that can be used to -// guide the usage of a metric. -type MetricDescriptorMetadata struct { - // IngestDelay: The delay of data points caused by ingestion. Data - // points older than this age are guaranteed to be ingested and - // available to be read, excluding data loss due to errors. - IngestDelay string `json:"ingestDelay,omitempty"` - - // LaunchStage: The launch stage of the metric definition. - // - // Possible values: - // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. - // "EARLY_ACCESS" - Early Access features are limited to a closed - // group of testers. To use these features, you must sign up in advance - // and sign a Trusted Tester agreement (which includes confidentiality - // provisions). These features may be unstable, changed in - // backward-incompatible ways, and are not guaranteed to be released. - // "ALPHA" - Alpha is a limited availability test for releases before - // they are cleared for widespread use. By Alpha, all significant design - // issues are resolved and we are in the process of verifying - // functionality. Alpha customers need to apply for access, agree to - // applicable terms, and have their projects whitelisted. Alpha releases - // don’t have to be feature complete, no SLAs are provided, and there - // are no technical support obligations, but they will be far enough - // along that customers can actually use them in test environments or - // for limited-use tests -- just like they would in normal production - // cases. - // "BETA" - Beta is the point at which we are ready to open a release - // for any customer to use. There are no SLA or technical support - // obligations in a Beta release. Products will be complete from a - // feature perspective, but may have some open outstanding issues. Beta - // releases are suitable for limited production use cases. - // "GA" - GA features are open to all developers and are considered - // stable and fully qualified for production use. - // "DEPRECATED" - Deprecated features are scheduled to be shut down - // and removed. For more information, see the “Deprecation Policy” - // section of our Terms of Service (https://cloud.google.com/terms/) and - // the Google Cloud Platform Subject to the Deprecation Policy - // (https://cloud.google.com/terms/deprecation) documentation. - LaunchStage string `json:"launchStage,omitempty"` - - // SamplePeriod: The sampling period of metric data points. For metrics - // which are written periodically, consecutive data points are stored at - // this time interval, excluding data loss due to errors. Metrics with a - // higher granularity have a smaller sampling period. - SamplePeriod string `json:"samplePeriod,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IngestDelay") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IngestDelay") 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 *MetricDescriptorMetadata) MarshalJSON() ([]byte, error) { - type NoMethod MetricDescriptorMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MetricThreshold: A condition type that compares a collection of time -// series against a threshold. -type MetricThreshold struct { - // Aggregations: Specifies the alignment of data points in individual - // time series as well as how to combine the retrieved time series - // together (such as when aggregating multiple streams on each resource - // to a single stream for each resource or when aggregating streams - // across all members of a group of resrouces). Multiple aggregations - // are applied in the order specified.This field is similar to the one - // in the MetricService.ListTimeSeries request. It is advisable to use - // the ListTimeSeries method when debugging this field. - Aggregations []*Aggregation `json:"aggregations,omitempty"` - - // Comparison: The comparison to apply between the time series - // (indicated by filter and aggregation) and the threshold (indicated by - // threshold_value). The comparison is applied on each time series, with - // the time series on the left-hand side and the threshold on the - // right-hand side.Only COMPARISON_LT and COMPARISON_GT are supported - // currently. - // - // Possible values: - // "COMPARISON_UNSPECIFIED" - No ordering relationship is specified. - // "COMPARISON_GT" - The left argument is greater than the right - // argument. - // "COMPARISON_GE" - The left argument is greater than or equal to the - // right argument. - // "COMPARISON_LT" - The left argument is less than the right - // argument. - // "COMPARISON_LE" - The left argument is less than or equal to the - // right argument. - // "COMPARISON_EQ" - The left argument is equal to the right argument. - // "COMPARISON_NE" - The left argument is not equal to the right - // argument. - Comparison string `json:"comparison,omitempty"` - - // DenominatorAggregations: Specifies the alignment of data points in - // individual time series selected by denominatorFilter as well as how - // to combine the retrieved time series together (such as when - // aggregating multiple streams on each resource to a single stream for - // each resource or when aggregating streams across all members of a - // group of resources).When computing ratios, the aggregations and - // denominator_aggregations fields must use the same alignment period - // and produce time series that have the same periodicity and - // labels.This field is similar to the one in the - // MetricService.ListTimeSeries request. It is advisable to use the - // ListTimeSeries method when debugging this field. - DenominatorAggregations []*Aggregation `json:"denominatorAggregations,omitempty"` - - // DenominatorFilter: A filter that identifies a time series that should - // be used as the denominator of a ratio that will be compared with the - // threshold. If a denominator_filter is specified, the time series - // specified by the filter field will be used as the numerator.The - // filter is similar to the one that is specified in the - // MetricService.ListTimeSeries request (that call is useful to verify - // the time series that will be retrieved / processed) and must specify - // the metric type and optionally may contain restrictions on resource - // type, resource labels, and metric labels. This field may not exceed - // 2048 Unicode characters in length. - DenominatorFilter string `json:"denominatorFilter,omitempty"` - - // Duration: The amount of time that a time series must violate the - // threshold to be considered failing. Currently, only values that are a - // multiple of a minute--e.g., 0, 60, 120, or 300 seconds--are - // supported. If an invalid value is given, an error will be returned. - // When choosing a duration, it is useful to keep in mind the frequency - // of the underlying time series data (which may also be affected by any - // alignments specified in the aggregations field); a good duration is - // long enough so that a single outlier does not generate spurious - // alerts, but short enough that unhealthy states are detected and - // alerted on quickly. - Duration string `json:"duration,omitempty"` - - // Filter: A filter that identifies which time series should be compared - // with the threshold.The filter is similar to the one that is specified - // in the MetricService.ListTimeSeries request (that call is useful to - // verify the time series that will be retrieved / processed) and must - // specify the metric type and optionally may contain restrictions on - // resource type, resource labels, and metric labels. This field may not - // exceed 2048 Unicode characters in length. - Filter string `json:"filter,omitempty"` - - // ThresholdValue: A value against which to compare the time series. - ThresholdValue float64 `json:"thresholdValue,omitempty"` - - // Trigger: The number/percent of time series for which the comparison - // must hold in order for the condition to trigger. If unspecified, then - // the condition will trigger if the comparison is true for any of the - // time series that have been identified by filter and aggregations, or - // by the ratio, if denominator_filter and denominator_aggregations are - // specified. - Trigger *Trigger `json:"trigger,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Aggregations") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Aggregations") 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 *MetricThreshold) MarshalJSON() ([]byte, error) { - type NoMethod MetricThreshold - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *MetricThreshold) UnmarshalJSON(data []byte) error { - type NoMethod MetricThreshold - var s1 struct { - ThresholdValue gensupport.JSONFloat64 `json:"thresholdValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ThresholdValue = float64(s1.ThresholdValue) - return nil -} - -// MonitoredResource: An object representing a resource that can be used -// for monitoring, logging, billing, or other purposes. Examples include -// virtual machine instances, databases, and storage devices such as -// disks. The type field identifies a MonitoredResourceDescriptor object -// that describes the resource's schema. Information in the labels field -// identifies the actual resource and its attributes according to the -// schema. For example, a particular Compute Engine VM instance could be -// represented by the following object, because the -// MonitoredResourceDescriptor for "gce_instance" has labels -// "instance_id" and "zone": -// { "type": "gce_instance", -// "labels": { "instance_id": "12345678901234", -// "zone": "us-central1-a" }} -// -type MonitoredResource struct { - // Labels: Required. Values for all of the labels listed in the - // associated monitored resource descriptor. For example, Compute Engine - // VM instances use the labels "project_id", "instance_id", and "zone". - Labels map[string]string `json:"labels,omitempty"` - - // Type: Required. The monitored resource type. This field must match - // the type field of a MonitoredResourceDescriptor object. For example, - // the type of a Compute Engine VM instance is gce_instance. For a list - // of types, see Monitoring resource types and Logging resource types. - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Labels") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Labels") 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 *MonitoredResource) MarshalJSON() ([]byte, error) { - type NoMethod MonitoredResource - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MonitoredResourceDescriptor: An object that describes the schema of a -// MonitoredResource object using a type name and a set of labels. For -// example, the monitored resource descriptor for Google Compute Engine -// VM instances has a type of "gce_instance" and specifies the use of -// the labels "instance_id" and "zone" to identify particular VM -// instances.Different APIs can support different monitored resource -// types. APIs generally provide a list method that returns the -// monitored resource descriptors used by the API. -type MonitoredResourceDescriptor struct { - // Description: Optional. A detailed description of the monitored - // resource type that might be used in documentation. - Description string `json:"description,omitempty"` - - // DisplayName: Optional. A concise name for the monitored resource type - // that might be displayed in user interfaces. It should be a Title - // Cased Noun Phrase, without any article or other determiners. For - // example, "Google Cloud SQL Database". - DisplayName string `json:"displayName,omitempty"` - - // Labels: Required. A set of labels used to describe instances of this - // monitored resource type. For example, an individual Google Cloud SQL - // database is identified by values for the labels "database_id" and - // "zone". - Labels []*LabelDescriptor `json:"labels,omitempty"` - - // Name: Optional. The resource name of the monitored resource - // descriptor: - // "projects/{project_id}/monitoredResourceDescriptors/{type}" where - // {type} is the value of the type field in this object and {project_id} - // is a project ID that provides API-specific context for accessing the - // type. APIs that do not use project information can use the resource - // name format "monitoredResourceDescriptors/{type}". - Name string `json:"name,omitempty"` - - // Type: Required. The monitored resource type. For example, the type - // "cloudsql_database" represents databases in Google Cloud SQL. The - // maximum length of this value is 256 characters. - Type string `json:"type,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) { - type NoMethod MonitoredResourceDescriptor - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MonitoredResourceMetadata: Auxiliary metadata for a MonitoredResource -// object. MonitoredResource objects contain the minimum set of -// information to uniquely identify a monitored resource instance. There -// is some other useful auxiliary metadata. Monitoring and Logging use -// an ingestion pipeline to extract metadata for cloud resources of all -// types, and store the metadata in this message. -type MonitoredResourceMetadata struct { - // SystemLabels: Output only. Values for predefined system metadata - // labels. System labels are a kind of metadata extracted by Google, - // including "machine_image", "vpc", "subnet_id", "security_group", - // "name", etc. System label values can be only strings, Boolean values, - // or a list of strings. For example: - // { "name": "my-test-instance", - // "security_group": ["a", "b", "c"], - // "spot_instance": false } - // - SystemLabels googleapi.RawMessage `json:"systemLabels,omitempty"` - - // UserLabels: Output only. A map of user-defined metadata labels. - UserLabels map[string]string `json:"userLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SystemLabels") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SystemLabels") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MonitoredResourceMetadata) MarshalJSON() ([]byte, error) { - type NoMethod MonitoredResourceMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MutationRecord: Describes a change made to a configuration. -type MutationRecord struct { - // MutateTime: When the change occurred. - MutateTime string `json:"mutateTime,omitempty"` - - // MutatedBy: The email address of the user making the change. - MutatedBy string `json:"mutatedBy,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MutateTime") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MutateTime") 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 *MutationRecord) MarshalJSON() ([]byte, error) { - type NoMethod MutationRecord - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NotificationChannel: A NotificationChannel is a medium through which -// an alert is delivered when a policy violation is detected. Examples -// of channels include email, SMS, and third-party messaging -// applications. Fields containing sensitive information like -// authentication tokens or contact info are only partially populated on -// retrieval. -type NotificationChannel struct { - // Description: An optional human-readable description of this - // notification channel. This description may provide additional - // details, beyond the display name, for the channel. This may not - // exceeed 1024 Unicode characters. - Description string `json:"description,omitempty"` - - // DisplayName: An optional human-readable name for this notification - // channel. It is recommended that you specify a non-empty and unique - // name in order to make it easier to identify the channels in your - // project, though this is not enforced. The display name is limited to - // 512 Unicode characters. - DisplayName string `json:"displayName,omitempty"` - - // Enabled: Whether notifications are forwarded to the described - // channel. This makes it possible to disable delivery of notifications - // to a particular channel without removing the channel from all - // alerting policies that reference the channel. This is a more - // convenient approach when the change is temporary and you want to - // receive notifications from the same set of alerting policies on the - // channel at some point in the future. - Enabled bool `json:"enabled,omitempty"` - - // Labels: Configuration fields that define the channel and its - // behavior. The permissible and required labels are specified in the - // NotificationChannelDescriptor.labels of the - // NotificationChannelDescriptor corresponding to the type field. - Labels map[string]string `json:"labels,omitempty"` - - // Name: The full REST resource name for this channel. The syntax - // is: - // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] - // The [CHANNEL_ID] is automatically assigned by the server on creation. - Name string `json:"name,omitempty"` - - // Type: The type of the notification channel. This field matches the - // value of the NotificationChannelDescriptor.type field. - Type string `json:"type,omitempty"` - - // UserLabels: User-supplied key/value data that does not need to - // conform to the corresponding NotificationChannelDescriptor's schema, - // unlike the labels field. This field is intended to be used for - // organizing and identifying the NotificationChannel objects.The field - // can contain up to 64 entries. Each key and value is limited to 63 - // Unicode characters or 128 bytes, whichever is smaller. Labels and - // values can contain only lowercase letters, numerals, underscores, and - // dashes. Keys must begin with a letter. - UserLabels map[string]string `json:"userLabels,omitempty"` - - // VerificationStatus: Indicates whether this channel has been verified - // or not. On a ListNotificationChannels or GetNotificationChannel - // operation, this field is expected to be populated.If the value is - // UNVERIFIED, then it indicates that the channel is non-functioning (it - // both requires verification and lacks verification); otherwise, it is - // assumed that the channel works.If the channel is neither VERIFIED nor - // UNVERIFIED, it implies that the channel is of a type that does not - // require verification or that this specific channel has been exempted - // from verification because it was created prior to verification being - // required for channels of this type.This field cannot be modified - // using a standard UpdateNotificationChannel operation. To change the - // value of this field, you must call VerifyNotificationChannel. - // - // Possible values: - // "VERIFICATION_STATUS_UNSPECIFIED" - Sentinel value used to indicate - // that the state is unknown, omitted, or is not applicable (as in the - // case of channels that neither support nor require verification in - // order to function). - // "UNVERIFIED" - The channel has yet to be verified and requires - // verification to function. Note that this state also applies to the - // case where the verification process has been initiated by sending a - // verification code but where the verification code has not been - // submitted to complete the process. - // "VERIFIED" - It has been proven that notifications can be received - // on this notification channel and that someone on the project has - // access to messages that are delivered to that channel. - VerificationStatus string `json:"verificationStatus,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NotificationChannel) MarshalJSON() ([]byte, error) { - type NoMethod NotificationChannel - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NotificationChannelDescriptor: A description of a notification -// channel. The descriptor includes the properties of the channel and -// the set of labels or fields that must be specified to configure -// channels of a given type. -type NotificationChannelDescriptor struct { - // Description: A human-readable description of the notification channel - // type. The description may include a description of the properties of - // the channel and pointers to external documentation. - Description string `json:"description,omitempty"` - - // DisplayName: A human-readable name for the notification channel type. - // This form of the name is suitable for a user interface. - DisplayName string `json:"displayName,omitempty"` - - // Labels: The set of labels that must be defined to identify a - // particular channel of the corresponding type. Each label includes a - // description for how that field should be populated. - Labels []*LabelDescriptor `json:"labels,omitempty"` - - // Name: The full REST resource name for this descriptor. The syntax - // is: - // projects/[PROJECT_ID]/notificationChannelDescriptors/[TYPE] - // In the above, [TYPE] is the value of the type field. - Name string `json:"name,omitempty"` - - // SupportedTiers: The tiers that support this notification channel; the - // project service tier must be one of the supported_tiers. - // - // Possible values: - // "SERVICE_TIER_UNSPECIFIED" - An invalid sentinel value, used to - // indicate that a tier has not been provided explicitly. - // "SERVICE_TIER_BASIC" - The Stackdriver Basic tier, a free tier of - // service that provides basic features, a moderate allotment of logs, - // and access to built-in metrics. A number of features are not - // available in this tier. For more details, see the service tiers - // documentation (https://cloud.google.com/monitoring/workspaces/tiers). - // "SERVICE_TIER_PREMIUM" - The Stackdriver Premium tier, a higher, - // more expensive tier of service that provides access to all - // Stackdriver features, lets you use Stackdriver with AWS accounts, and - // has a larger allotments for logs and metrics. For more details, see - // the service tiers documentation - // (https://cloud.google.com/monitoring/workspaces/tiers). - SupportedTiers []string `json:"supportedTiers,omitempty"` - - // Type: The type of notification channel, such as "email", "sms", etc. - // Notification channel types are globally unique. - Type string `json:"type,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NotificationChannelDescriptor) MarshalJSON() ([]byte, error) { - type NoMethod NotificationChannelDescriptor - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Option: A protocol buffer option, which can be attached to a message, -// field, enumeration, etc. -type Option struct { - // Name: The option's name. For protobuf built-in options (options - // defined in descriptor.proto), this is the short name. For example, - // "map_entry". For custom options, it should be the fully-qualified - // name. For example, "google.api.http". - Name string `json:"name,omitempty"` - - // Value: The option's value packed in an Any message. If the value is a - // primitive, the corresponding wrapper type defined in - // google/protobuf/wrappers.proto should be used. If the value is an - // enum, it should be stored as an int32 value using the - // google.protobuf.Int32Value type. - Value googleapi.RawMessage `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Name") 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 *Option) MarshalJSON() ([]byte, error) { - type NoMethod Option - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Point: A single data point in a time series. -type Point struct { - // Interval: The time interval to which the data point applies. For - // GAUGE metrics, only the end time of the interval is used. For DELTA - // metrics, the start and end time should specify a non-zero interval, - // with subsequent points specifying contiguous and non-overlapping - // intervals. For CUMULATIVE metrics, the start and end time should - // specify a non-zero interval, with subsequent points specifying the - // same start time and increasing end times, until an event resets the - // cumulative value to zero and sets a new start time for the following - // points. - Interval *TimeInterval `json:"interval,omitempty"` - - // Value: The value of the data point. - Value *TypedValue `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Interval") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Interval") 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 *Point) MarshalJSON() ([]byte, error) { - type NoMethod Point - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Range: The range of the population values. -type Range struct { - // Max: The maximum of the population values. - Max float64 `json:"max,omitempty"` - - // Min: The minimum of the population values. - Min float64 `json:"min,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Max") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Max") 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 *Range) MarshalJSON() ([]byte, error) { - type NoMethod Range - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Range) UnmarshalJSON(data []byte) error { - type NoMethod Range - var s1 struct { - Max gensupport.JSONFloat64 `json:"max"` - Min gensupport.JSONFloat64 `json:"min"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Max = float64(s1.Max) - s.Min = float64(s1.Min) - return nil -} - -// ResourceGroup: The resource submessage for group checks. It can be -// used instead of a monitored resource, when multiple resources are -// being monitored. -type ResourceGroup struct { - // GroupId: The group of resources being monitored. Should be only the - // group_id, not projects//groups/. - GroupId string `json:"groupId,omitempty"` - - // ResourceType: The resource type of the group members. - // - // Possible values: - // "RESOURCE_TYPE_UNSPECIFIED" - Default value (not valid). - // "INSTANCE" - A group of instances from Google Cloud Platform (GCP) - // or Amazon Web Services (AWS). - // "AWS_ELB_LOAD_BALANCER" - A group of Amazon ELB load balancers. - ResourceType string `json:"resourceType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GroupId") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GroupId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ResourceGroup) MarshalJSON() ([]byte, error) { - type NoMethod ResourceGroup - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SendNotificationChannelVerificationCodeRequest: The -// SendNotificationChannelVerificationCode request. -type SendNotificationChannelVerificationCodeRequest struct { -} - -// SourceContext: SourceContext represents information about the source -// of a protobuf element, like the file in which it is defined. -type SourceContext struct { - // FileName: The path-qualified name of the .proto file that contained - // the associated protobuf element. For example: - // "google/protobuf/source_context.proto". - FileName string `json:"fileName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FileName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "FileName") 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 *SourceContext) MarshalJSON() ([]byte, error) { - type NoMethod SourceContext - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SpanContext: The context of a span, attached to -// google.api.Distribution.Exemplars in google.api.Distribution values -// during aggregation.It contains the name of a span with format: -// projects/PROJECT_ID/traces/TRACE_ID/spans/SPAN_ID -type SpanContext struct { - // SpanName: The resource name of the span in the following - // format: - // projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] - // TRACE_ - // ID is a unique identifier for a trace within a project; it is a - // 32-character hexadecimal encoding of a 16-byte array.SPAN_ID is a - // unique identifier for a span within a trace; it is a 16-character - // hexadecimal encoding of an 8-byte array. - SpanName string `json:"spanName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SpanName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SpanName") 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 *SpanContext) MarshalJSON() ([]byte, error) { - type NoMethod SpanContext - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Status: The Status type defines a logical error model that is -// suitable for different programming environments, including REST APIs -// and RPC APIs. It is used by gRPC (https://github.com/grpc). The error -// model is designed to be: -// Simple to use and understand for most users -// Flexible enough to meet unexpected needsOverviewThe Status message -// contains three pieces of data: error code, error message, and error -// details. The error code should be an enum value of google.rpc.Code, -// but it may accept additional error codes if needed. The error message -// should be a developer-facing English message that helps developers -// understand and resolve the error. If a localized user-facing error -// message is needed, put the localized message in the error details or -// localize it in the client. The optional error details may contain -// arbitrary information about the error. There is a predefined set of -// error detail types in the package google.rpc that can be used for -// common error conditions.Language mappingThe Status message is the -// logical representation of the error model, but it is not necessarily -// the actual wire format. When the Status message is exposed in -// different client libraries and different wire protocols, it can be -// mapped differently. For example, it will likely be mapped to some -// exceptions in Java, but more likely mapped to some error codes in -// C.Other usesThe error model and the Status message can be used in a -// variety of environments, either with or without APIs, to provide a -// consistent developer experience across different environments.Example -// uses of this error model include: -// Partial errors. If a service needs to return partial errors to the -// client, it may embed the Status in the normal response to indicate -// the partial errors. -// Workflow errors. A typical workflow has multiple steps. Each step may -// have a Status message for error reporting. -// Batch operations. If a client uses batch request and batch response, -// the Status message should be used directly inside batch response, one -// for each error sub-response. -// Asynchronous operations. If an API call embeds asynchronous operation -// results in its response, the status of those operations should be -// represented directly using the Status message. -// Logging. If some API errors are stored in logs, the message Status -// could be used directly after any stripping needed for -// security/privacy reasons. -type Status struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There is a - // common set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - - // Message: A developer-facing error message, which should be in - // English. Any user-facing error message should be localized and sent - // in the google.rpc.Status.details field, or localized by the client. - 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 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 *Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TcpCheck: Information required for a TCP uptime check request. -type TcpCheck struct { - // Port: The port to the page to run the check against. Will be combined - // with host (specified within the MonitoredResource) to construct the - // full URL. Required. - Port int64 `json:"port,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Port") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Port") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TcpCheck) MarshalJSON() ([]byte, error) { - type NoMethod TcpCheck - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TimeInterval: A time interval extending just after a start time -// through an end time. If the start time is the same as the end time, -// then the interval represents a single point in time. -type TimeInterval struct { - // EndTime: Required. The end of the time interval. - EndTime string `json:"endTime,omitempty"` - - // StartTime: Optional. The beginning of the time interval. The default - // value for the start time is the end time. The start time must not be - // later than the end time. - StartTime string `json:"startTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EndTime") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EndTime") 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 *TimeInterval) MarshalJSON() ([]byte, error) { - type NoMethod TimeInterval - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TimeSeries: A collection of data points that describes the -// time-varying values of a metric. A time series is identified by a -// combination of a fully-specified monitored resource and a -// fully-specified metric. This type is used for both listing and -// creating time series. -type TimeSeries struct { - // Metadata: Output only. The associated monitored resource metadata. - // When reading a a timeseries, this field will include metadata labels - // that are explicitly named in the reduction. When creating a - // timeseries, this field is ignored. - Metadata *MonitoredResourceMetadata `json:"metadata,omitempty"` - - // Metric: The associated metric. A fully-specified metric used to - // identify the time series. - Metric *Metric `json:"metric,omitempty"` - - // MetricKind: The metric kind of the time series. When listing time - // series, this metric kind might be different from the metric kind of - // the associated metric if this time series is an alignment or - // reduction of other time series.When creating a time series, this - // field is optional. If present, it must be the same as the metric kind - // of the associated metric. If the associated metric's descriptor must - // be auto-created, then this field specifies the metric kind of the new - // descriptor and must be either GAUGE (the default) or CUMULATIVE. - // - // Possible values: - // "METRIC_KIND_UNSPECIFIED" - Do not use this default value. - // "GAUGE" - An instantaneous measurement of a value. - // "DELTA" - The change in a value during a time interval. - // "CUMULATIVE" - A value accumulated over a time interval. Cumulative - // measurements in a time series should have the same start time and - // increasing end times, until an event resets the cumulative value to - // zero and sets a new start time for the following points. - MetricKind string `json:"metricKind,omitempty"` - - // Points: The data points of this time series. When listing time - // series, points are returned in reverse time order.When creating a - // time series, this field must contain exactly one point and the - // point's type must be the same as the value type of the associated - // metric. If the associated metric's descriptor must be auto-created, - // then the value type of the descriptor is determined by the point's - // type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION. - Points []*Point `json:"points,omitempty"` - - // Resource: The associated monitored resource. Custom metrics can use - // only certain monitored resource types in their time series data. - Resource *MonitoredResource `json:"resource,omitempty"` - - // ValueType: The value type of the time series. When listing time - // series, this value type might be different from the value type of the - // associated metric if this time series is an alignment or reduction of - // other time series.When creating a time series, this field is - // optional. If present, it must be the same as the type of the data in - // the points field. - // - // Possible values: - // "VALUE_TYPE_UNSPECIFIED" - Do not use this default value. - // "BOOL" - The value is a boolean. This value type can be used only - // if the metric kind is GAUGE. - // "INT64" - The value is a signed 64-bit integer. - // "DOUBLE" - The value is a double precision floating point number. - // "STRING" - The value is a text string. This value type can be used - // only if the metric kind is GAUGE. - // "DISTRIBUTION" - The value is a Distribution. - // "MONEY" - The value is money. - ValueType string `json:"valueType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Metadata") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Metadata") 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 *TimeSeries) MarshalJSON() ([]byte, error) { - type NoMethod TimeSeries - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Trigger: Specifies how many time series must fail a predicate to -// trigger a condition. If not specified, then a {count: 1} trigger is -// used. -type Trigger struct { - // Count: The absolute number of time series that must fail the - // predicate for the condition to be triggered. - Count int64 `json:"count,omitempty"` - - // Percent: The percentage of time series that must fail the predicate - // for the condition to be triggered. - Percent float64 `json:"percent,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Count") 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 *Trigger) MarshalJSON() ([]byte, error) { - type NoMethod Trigger - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Trigger) UnmarshalJSON(data []byte) error { - type NoMethod Trigger - var s1 struct { - Percent gensupport.JSONFloat64 `json:"percent"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Percent = float64(s1.Percent) - return nil -} - -// Type: A protocol buffer message type. -type Type struct { - // Fields: The list of fields. - Fields []*Field `json:"fields,omitempty"` - - // Name: The fully qualified message name. - Name string `json:"name,omitempty"` - - // Oneofs: The list of types appearing in oneof definitions in this - // type. - Oneofs []string `json:"oneofs,omitempty"` - - // Options: The protocol buffer options. - Options []*Option `json:"options,omitempty"` - - // SourceContext: The source context. - SourceContext *SourceContext `json:"sourceContext,omitempty"` - - // Syntax: The source syntax. - // - // Possible values: - // "SYNTAX_PROTO2" - Syntax proto2. - // "SYNTAX_PROTO3" - Syntax proto3. - Syntax string `json:"syntax,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fields") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fields") 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 *Type) MarshalJSON() ([]byte, error) { - type NoMethod Type - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TypedValue: A single strongly-typed value. -type TypedValue struct { - // BoolValue: A Boolean value: true or false. - BoolValue *bool `json:"boolValue,omitempty"` - - // DistributionValue: A distribution value. - DistributionValue *Distribution `json:"distributionValue,omitempty"` - - // DoubleValue: A 64-bit double-precision floating-point number. Its - // magnitude is approximately ±10±300 and it - // has 16 significant digits of precision. - DoubleValue *float64 `json:"doubleValue,omitempty"` - - // Int64Value: A 64-bit integer. Its range is approximately - // ±9.2x1018. - Int64Value *int64 `json:"int64Value,omitempty,string"` - - // StringValue: A variable-length string value. - StringValue *string `json:"stringValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BoolValue") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BoolValue") 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 *TypedValue) MarshalJSON() ([]byte, error) { - type NoMethod TypedValue - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *TypedValue) UnmarshalJSON(data []byte) error { - type NoMethod TypedValue - var s1 struct { - DoubleValue *gensupport.JSONFloat64 `json:"doubleValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - if s1.DoubleValue != nil { - s.DoubleValue = (*float64)(s1.DoubleValue) - } - return nil -} - -// UptimeCheckConfig: This message configures which resources and -// services to monitor for availability. -type UptimeCheckConfig struct { - // ContentMatchers: The expected content on the page the check is run - // against. Currently, only the first entry in the list is supported, - // and other entries will be ignored. The server will look for an exact - // match of the string in the page response's content. This field is - // optional and should only be specified if a content match is required. - ContentMatchers []*ContentMatcher `json:"contentMatchers,omitempty"` - - // DisplayName: A human-friendly name for the uptime check - // configuration. The display name should be unique within a Stackdriver - // Workspace in order to make it easier to identify; however, uniqueness - // is not enforced. Required. - DisplayName string `json:"displayName,omitempty"` - - // HttpCheck: Contains information needed to make an HTTP or HTTPS - // check. - HttpCheck *HttpCheck `json:"httpCheck,omitempty"` - - // InternalCheckers: The internal checkers that this check will egress - // from. If is_internal is true and this list is empty, the check will - // egress from all InternalCheckers configured for the project that owns - // this CheckConfig. - InternalCheckers []*InternalChecker `json:"internalCheckers,omitempty"` - - // IsInternal: Denotes whether this is a check that egresses from - // InternalCheckers. - IsInternal bool `json:"isInternal,omitempty"` - - // MonitoredResource: The monitored resource - // (https://cloud.google.com/monitoring/api/resources) associated with - // the configuration. The following monitored resource types are - // supported for uptime checks: uptime_url gce_instance gae_app - // aws_ec2_instance aws_elb_load_balancer - MonitoredResource *MonitoredResource `json:"monitoredResource,omitempty"` - - // Name: A unique resource name for this UptimeCheckConfig. The format - // is:projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].This - // field should be omitted when creating the uptime check configuration; - // on create, the resource name is assigned by the server and included - // in the response. - Name string `json:"name,omitempty"` - - // Period: How often, in seconds, the uptime check is performed. - // Currently, the only supported values are 60s (1 minute), 300s (5 - // minutes), 600s (10 minutes), and 900s (15 minutes). Optional, - // defaults to 300s. - Period string `json:"period,omitempty"` - - // ResourceGroup: The group resource associated with the configuration. - ResourceGroup *ResourceGroup `json:"resourceGroup,omitempty"` - - // SelectedRegions: The list of regions from which the check will be - // run. If this field is specified, enough regions to include a minimum - // of 3 locations must be provided, or an error message is returned. Not - // specifying this field will result in uptime checks running from all - // regions. - // - // Possible values: - // "REGION_UNSPECIFIED" - Default value if no region is specified. - // Will result in uptime checks running from all regions. - // "USA" - Allows checks to run from locations within the United - // States of America. - // "EUROPE" - Allows checks to run from locations within the continent - // of Europe. - // "SOUTH_AMERICA" - Allows checks to run from locations within the - // continent of South America. - // "ASIA_PACIFIC" - Allows checks to run from locations within the - // Asia Pacific area (ex: Singapore). - SelectedRegions []string `json:"selectedRegions,omitempty"` - - // TcpCheck: Contains information needed to make a TCP check. - TcpCheck *TcpCheck `json:"tcpCheck,omitempty"` - - // Timeout: The maximum amount of time to wait for the request to - // complete (must be between 1 and 60 seconds). Required. - Timeout string `json:"timeout,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ContentMatchers") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ContentMatchers") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *UptimeCheckConfig) MarshalJSON() ([]byte, error) { - type NoMethod UptimeCheckConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UptimeCheckIp: Contains the region, location, and list of IP -// addresses where checkers in the location run from. -type UptimeCheckIp struct { - // IpAddress: The IP address from which the uptime check originates. - // This is a full IP address (not an IP address range). Most IP - // addresses, as of this publication, are in IPv4 format; however, one - // should not rely on the IP addresses being in IPv4 format indefinitely - // and should support interpreting this field in either IPv4 or IPv6 - // format. - IpAddress string `json:"ipAddress,omitempty"` - - // Location: A more specific location within the region that typically - // encodes a particular city/town/metro (and its containing - // state/province or country) within the broader umbrella region - // category. - Location string `json:"location,omitempty"` - - // Region: A broad region category in which the IP address is located. - // - // Possible values: - // "REGION_UNSPECIFIED" - Default value if no region is specified. - // Will result in uptime checks running from all regions. - // "USA" - Allows checks to run from locations within the United - // States of America. - // "EUROPE" - Allows checks to run from locations within the continent - // of Europe. - // "SOUTH_AMERICA" - Allows checks to run from locations within the - // continent of South America. - // "ASIA_PACIFIC" - Allows checks to run from locations within the - // Asia Pacific area (ex: Singapore). - Region string `json:"region,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpAddress") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpAddress") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UptimeCheckIp) MarshalJSON() ([]byte, error) { - type NoMethod UptimeCheckIp - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// VerifyNotificationChannelRequest: The VerifyNotificationChannel -// request. -type VerifyNotificationChannelRequest struct { - // Code: The verification code that was delivered to the channel as a - // result of invoking the SendNotificationChannelVerificationCode API - // method or that was retrieved from a verified channel via - // GetNotificationChannelVerificationCode. For example, one might have - // "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only - // guaranteed that the code is valid UTF-8; one should not make any - // assumptions regarding the structure or format of the code). - Code string `json:"code,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "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 *VerifyNotificationChannelRequest) MarshalJSON() ([]byte, error) { - type NoMethod VerifyNotificationChannelRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "monitoring.metricDescriptors.create": - -type MetricDescriptorsCreateCall struct { - s *Service - name string - metricdescriptor *MetricDescriptor - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new metric descriptor. User-created metric -// descriptors define custom metrics. -func (r *MetricDescriptorsService) Create(name string, metricdescriptor *MetricDescriptor) *MetricDescriptorsCreateCall { - c := &MetricDescriptorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.metricdescriptor = metricdescriptor - 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 *MetricDescriptorsCreateCall) Fields(s ...googleapi.Field) *MetricDescriptorsCreateCall { - 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 *MetricDescriptorsCreateCall) Context(ctx context.Context) *MetricDescriptorsCreateCall { - 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 *MetricDescriptorsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MetricDescriptorsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.metricdescriptor) - 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, "v3/{+name}/metricDescriptors") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.metricDescriptors.create" call. -// Exactly one of *MetricDescriptor or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *MetricDescriptor.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 *MetricDescriptorsCreateCall) Do(opts ...googleapi.CallOption) (*MetricDescriptor, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MetricDescriptor{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new metric descriptor. User-created metric descriptors define custom metrics.", - // "flatPath": "v3/{v3Id}/{v3Id1}/metricDescriptors", - // "httpMethod": "POST", - // "id": "monitoring.metricDescriptors.create", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - // "location": "path", - // "pattern": "^[^/]+/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}/metricDescriptors", - // "request": { - // "$ref": "MetricDescriptor" - // }, - // "response": { - // "$ref": "MetricDescriptor" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.write" - // ] - // } - -} - -// method id "monitoring.metricDescriptors.delete": - -type MetricDescriptorsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a metric descriptor. Only user-created custom metrics -// can be deleted. -func (r *MetricDescriptorsService) Delete(name string) *MetricDescriptorsDeleteCall { - c := &MetricDescriptorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *MetricDescriptorsDeleteCall) Fields(s ...googleapi.Field) *MetricDescriptorsDeleteCall { - 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 *MetricDescriptorsDeleteCall) Context(ctx context.Context) *MetricDescriptorsDeleteCall { - 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 *MetricDescriptorsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MetricDescriptorsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.metricDescriptors.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *MetricDescriptorsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a metric descriptor. Only user-created custom metrics can be deleted.", - // "flatPath": "v3/{v3Id}/{v3Id1}/metricDescriptors/{metricDescriptorsId}", - // "httpMethod": "DELETE", - // "id": "monitoring.metricDescriptors.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The metric descriptor on which to execute the request. The format is \"projects/{project_id_or_number}/metricDescriptors/{metric_id}\". An example of {metric_id} is: \"custom.googleapis.com/my_test_metric\".", - // "location": "path", - // "pattern": "^[^/]+/[^/]+/metricDescriptors/.+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.metricDescriptors.get": - -type MetricDescriptorsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a single metric descriptor. This method does not require a -// Stackdriver account. -func (r *MetricDescriptorsService) Get(name string) *MetricDescriptorsGetCall { - c := &MetricDescriptorsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *MetricDescriptorsGetCall) Fields(s ...googleapi.Field) *MetricDescriptorsGetCall { - 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 *MetricDescriptorsGetCall) IfNoneMatch(entityTag string) *MetricDescriptorsGetCall { - 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 *MetricDescriptorsGetCall) Context(ctx context.Context) *MetricDescriptorsGetCall { - 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 *MetricDescriptorsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MetricDescriptorsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.metricDescriptors.get" call. -// Exactly one of *MetricDescriptor or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *MetricDescriptor.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 *MetricDescriptorsGetCall) Do(opts ...googleapi.CallOption) (*MetricDescriptor, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MetricDescriptor{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets a single metric descriptor. This method does not require a Stackdriver account.", - // "flatPath": "v3/{v3Id}/{v3Id1}/metricDescriptors/{metricDescriptorsId}", - // "httpMethod": "GET", - // "id": "monitoring.metricDescriptors.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The metric descriptor on which to execute the request. The format is \"projects/{project_id_or_number}/metricDescriptors/{metric_id}\". An example value of {metric_id} is \"compute.googleapis.com/instance/disk/read_bytes_count\".", - // "location": "path", - // "pattern": "^[^/]+/[^/]+/metricDescriptors/.+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "MetricDescriptor" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read", - // "https://www.googleapis.com/auth/monitoring.write" - // ] - // } - -} - -// method id "monitoring.metricDescriptors.list": - -type MetricDescriptorsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists metric descriptors that match a filter. This method does -// not require a Stackdriver account. -func (r *MetricDescriptorsService) List(name string) *MetricDescriptorsListCall { - c := &MetricDescriptorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": If this field is empty, -// all custom and system-defined metric descriptors are returned. -// Otherwise, the filter specifies which metric descriptors are to be -// returned. For example, the following filter matches all custom -// metrics: -// metric.type = starts_with("custom.googleapis.com/") -func (c *MetricDescriptorsListCall) Filter(filter string) *MetricDescriptorsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": A positive number -// that is the maximum number of results to return. -func (c *MetricDescriptorsListCall) PageSize(pageSize int64) *MetricDescriptorsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If this field is -// not empty then it must contain the nextPageToken value returned by a -// previous call to this method. Using this field causes the method to -// return additional results from the previous method call. -func (c *MetricDescriptorsListCall) PageToken(pageToken string) *MetricDescriptorsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *MetricDescriptorsListCall) Fields(s ...googleapi.Field) *MetricDescriptorsListCall { - 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 *MetricDescriptorsListCall) IfNoneMatch(entityTag string) *MetricDescriptorsListCall { - 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 *MetricDescriptorsListCall) Context(ctx context.Context) *MetricDescriptorsListCall { - 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 *MetricDescriptorsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MetricDescriptorsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/metricDescriptors") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.metricDescriptors.list" call. -// Exactly one of *ListMetricDescriptorsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListMetricDescriptorsResponse.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 *MetricDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListMetricDescriptorsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListMetricDescriptorsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists metric descriptors that match a filter. This method does not require a Stackdriver account.", - // "flatPath": "v3/{v3Id}/{v3Id1}/metricDescriptors", - // "httpMethod": "GET", - // "id": "monitoring.metricDescriptors.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "If this field is empty, all custom and system-defined metric descriptors are returned. Otherwise, the filter specifies which metric descriptors are to be returned. For example, the following filter matches all custom metrics:\nmetric.type = starts_with(\"custom.googleapis.com/\")\n", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - // "location": "path", - // "pattern": "^[^/]+/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "A positive number that is the maximum number of results to return.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/{+name}/metricDescriptors", - // "response": { - // "$ref": "ListMetricDescriptorsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read", - // "https://www.googleapis.com/auth/monitoring.write" - // ] - // } - -} - -// 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 *MetricDescriptorsListCall) Pages(ctx context.Context, f func(*ListMetricDescriptorsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "monitoring.monitoredResourceDescriptors.get": - -type MonitoredResourceDescriptorsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a single monitored resource descriptor. This method does -// not require a Stackdriver account. -func (r *MonitoredResourceDescriptorsService) Get(name string) *MonitoredResourceDescriptorsGetCall { - c := &MonitoredResourceDescriptorsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *MonitoredResourceDescriptorsGetCall) Fields(s ...googleapi.Field) *MonitoredResourceDescriptorsGetCall { - 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 *MonitoredResourceDescriptorsGetCall) IfNoneMatch(entityTag string) *MonitoredResourceDescriptorsGetCall { - 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 *MonitoredResourceDescriptorsGetCall) Context(ctx context.Context) *MonitoredResourceDescriptorsGetCall { - 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 *MonitoredResourceDescriptorsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MonitoredResourceDescriptorsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.monitoredResourceDescriptors.get" call. -// Exactly one of *MonitoredResourceDescriptor or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *MonitoredResourceDescriptor.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 *MonitoredResourceDescriptorsGetCall) Do(opts ...googleapi.CallOption) (*MonitoredResourceDescriptor, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MonitoredResourceDescriptor{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets a single monitored resource descriptor. This method does not require a Stackdriver account.", - // "flatPath": "v3/{v3Id}/{v3Id1}/monitoredResourceDescriptors/{monitoredResourceDescriptorsId}", - // "httpMethod": "GET", - // "id": "monitoring.monitoredResourceDescriptors.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The monitored resource descriptor to get. The format is \"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}\". The {resource_type} is a predefined type, such as cloudsql_database.", - // "location": "path", - // "pattern": "^[^/]+/[^/]+/monitoredResourceDescriptors/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "MonitoredResourceDescriptor" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read", - // "https://www.googleapis.com/auth/monitoring.write" - // ] - // } - -} - -// method id "monitoring.monitoredResourceDescriptors.list": - -type MonitoredResourceDescriptorsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists monitored resource descriptors that match a filter. This -// method does not require a Stackdriver account. -func (r *MonitoredResourceDescriptorsService) List(name string) *MonitoredResourceDescriptorsListCall { - c := &MonitoredResourceDescriptorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": An optional filter -// describing the descriptors to be returned. The filter can reference -// the descriptor's type and labels. For example, the following filter -// returns only Google Compute Engine descriptors that have an id -// label: -// resource.type = starts_with("gce_") AND resource.label:id -func (c *MonitoredResourceDescriptorsListCall) Filter(filter string) *MonitoredResourceDescriptorsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": A positive number -// that is the maximum number of results to return. -func (c *MonitoredResourceDescriptorsListCall) PageSize(pageSize int64) *MonitoredResourceDescriptorsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If this field is -// not empty then it must contain the nextPageToken value returned by a -// previous call to this method. Using this field causes the method to -// return additional results from the previous method call. -func (c *MonitoredResourceDescriptorsListCall) PageToken(pageToken string) *MonitoredResourceDescriptorsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *MonitoredResourceDescriptorsListCall) Fields(s ...googleapi.Field) *MonitoredResourceDescriptorsListCall { - 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 *MonitoredResourceDescriptorsListCall) IfNoneMatch(entityTag string) *MonitoredResourceDescriptorsListCall { - 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 *MonitoredResourceDescriptorsListCall) Context(ctx context.Context) *MonitoredResourceDescriptorsListCall { - 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 *MonitoredResourceDescriptorsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MonitoredResourceDescriptorsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/monitoredResourceDescriptors") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.monitoredResourceDescriptors.list" call. -// Exactly one of *ListMonitoredResourceDescriptorsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *ListMonitoredResourceDescriptorsResponse.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 *MonitoredResourceDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListMonitoredResourceDescriptorsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.", - // "flatPath": "v3/{v3Id}/{v3Id1}/monitoredResourceDescriptors", - // "httpMethod": "GET", - // "id": "monitoring.monitoredResourceDescriptors.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "An optional filter describing the descriptors to be returned. The filter can reference the descriptor's type and labels. For example, the following filter returns only Google Compute Engine descriptors that have an id label:\nresource.type = starts_with(\"gce_\") AND resource.label:id\n", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - // "location": "path", - // "pattern": "^[^/]+/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "A positive number that is the maximum number of results to return.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/{+name}/monitoredResourceDescriptors", - // "response": { - // "$ref": "ListMonitoredResourceDescriptorsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read", - // "https://www.googleapis.com/auth/monitoring.write" - // ] - // } - -} - -// 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 *MonitoredResourceDescriptorsListCall) Pages(ctx context.Context, f func(*ListMonitoredResourceDescriptorsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "monitoring.projects.alertPolicies.create": - -type ProjectsAlertPoliciesCreateCall struct { - s *Service - name string - alertpolicy *AlertPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new alerting policy. -func (r *ProjectsAlertPoliciesService) Create(name string, alertpolicy *AlertPolicy) *ProjectsAlertPoliciesCreateCall { - c := &ProjectsAlertPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.alertpolicy = alertpolicy - 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 *ProjectsAlertPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsAlertPoliciesCreateCall { - 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 *ProjectsAlertPoliciesCreateCall) Context(ctx context.Context) *ProjectsAlertPoliciesCreateCall { - 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 *ProjectsAlertPoliciesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsAlertPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.alertpolicy) - 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, "v3/{+name}/alertPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.alertPolicies.create" call. -// Exactly one of *AlertPolicy or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AlertPolicy.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 *ProjectsAlertPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*AlertPolicy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AlertPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new alerting policy.", - // "flatPath": "v3/projects/{projectsId}/alertPolicies", - // "httpMethod": "POST", - // "id": "monitoring.projects.alertPolicies.create", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The project in which to create the alerting policy. The format is projects/[PROJECT_ID].Note that this field names the parent container in which the alerting policy will be written, not the name of the created policy. The alerting policy that is returned will have a name that contains a normalized representation of this name as a prefix but adds a suffix of the form /alertPolicies/[POLICY_ID], identifying the policy in the container.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}/alertPolicies", - // "request": { - // "$ref": "AlertPolicy" - // }, - // "response": { - // "$ref": "AlertPolicy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.alertPolicies.delete": - -type ProjectsAlertPoliciesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes an alerting policy. -func (r *ProjectsAlertPoliciesService) Delete(name string) *ProjectsAlertPoliciesDeleteCall { - c := &ProjectsAlertPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsAlertPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsAlertPoliciesDeleteCall { - 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 *ProjectsAlertPoliciesDeleteCall) Context(ctx context.Context) *ProjectsAlertPoliciesDeleteCall { - 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 *ProjectsAlertPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsAlertPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.alertPolicies.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsAlertPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes an alerting policy.", - // "flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}", - // "httpMethod": "DELETE", - // "id": "monitoring.projects.alertPolicies.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The alerting policy to delete. The format is:\nprojects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]\nFor more information, see AlertPolicy.", - // "location": "path", - // "pattern": "^projects/[^/]+/alertPolicies/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.alertPolicies.get": - -type ProjectsAlertPoliciesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a single alerting policy. -func (r *ProjectsAlertPoliciesService) Get(name string) *ProjectsAlertPoliciesGetCall { - c := &ProjectsAlertPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsAlertPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsAlertPoliciesGetCall { - 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 *ProjectsAlertPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsAlertPoliciesGetCall { - 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 *ProjectsAlertPoliciesGetCall) Context(ctx context.Context) *ProjectsAlertPoliciesGetCall { - 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 *ProjectsAlertPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsAlertPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.alertPolicies.get" call. -// Exactly one of *AlertPolicy or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AlertPolicy.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 *ProjectsAlertPoliciesGetCall) Do(opts ...googleapi.CallOption) (*AlertPolicy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AlertPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets a single alerting policy.", - // "flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}", - // "httpMethod": "GET", - // "id": "monitoring.projects.alertPolicies.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The alerting policy to retrieve. The format is\nprojects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]\n", - // "location": "path", - // "pattern": "^projects/[^/]+/alertPolicies/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "AlertPolicy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read" - // ] - // } - -} - -// method id "monitoring.projects.alertPolicies.list": - -type ProjectsAlertPoliciesListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the existing alerting policies for the project. -func (r *ProjectsAlertPoliciesService) List(name string) *ProjectsAlertPoliciesListCall { - c := &ProjectsAlertPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": If provided, this field -// specifies the criteria that must be met by alert policies to be -// included in the response.For more details, see sorting and filtering. -func (c *ProjectsAlertPoliciesListCall) Filter(filter string) *ProjectsAlertPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list -// of fields by which to sort the result. Supports the same set of field -// references as the filter field. Entries can be prefixed with a minus -// sign to sort by the field in descending order.For more details, see -// sorting and filtering. -func (c *ProjectsAlertPoliciesListCall) OrderBy(orderBy string) *ProjectsAlertPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. -func (c *ProjectsAlertPoliciesListCall) PageSize(pageSize int64) *ProjectsAlertPoliciesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If this field is -// not empty then it must contain the nextPageToken value returned by a -// previous call to this method. Using this field causes the method to -// return more results from the previous method call. -func (c *ProjectsAlertPoliciesListCall) PageToken(pageToken string) *ProjectsAlertPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsAlertPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsAlertPoliciesListCall { - 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 *ProjectsAlertPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsAlertPoliciesListCall { - 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 *ProjectsAlertPoliciesListCall) Context(ctx context.Context) *ProjectsAlertPoliciesListCall { - 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 *ProjectsAlertPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsAlertPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/alertPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.alertPolicies.list" call. -// Exactly one of *ListAlertPoliciesResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListAlertPoliciesResponse.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 *ProjectsAlertPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListAlertPoliciesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListAlertPoliciesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the existing alerting policies for the project.", - // "flatPath": "v3/projects/{projectsId}/alertPolicies", - // "httpMethod": "GET", - // "id": "monitoring.projects.alertPolicies.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "If provided, this field specifies the criteria that must be met by alert policies to be included in the response.For more details, see sorting and filtering.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The project whose alert policies are to be listed. The format is\nprojects/[PROJECT_ID]\nNote that this field names the parent container in which the alerting policies to be listed are stored. To retrieve a single alerting policy by name, use the GetAlertPolicy operation, instead.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "orderBy": { - // "description": "A comma-separated list of fields by which to sort the result. Supports the same set of field references as the filter field. Entries can be prefixed with a minus sign to sort by the field in descending order.For more details, see sorting and filtering.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of results to return in a single response.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/{+name}/alertPolicies", - // "response": { - // "$ref": "ListAlertPoliciesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsAlertPoliciesListCall) Pages(ctx context.Context, f func(*ListAlertPoliciesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "monitoring.projects.alertPolicies.patch": - -type ProjectsAlertPoliciesPatchCall struct { - s *Service - name string - alertpolicy *AlertPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an alerting policy. You can either replace the entire -// policy with a new one or replace only certain fields in the current -// alerting policy by specifying the fields to be updated via -// updateMask. Returns the updated alerting policy. -func (r *ProjectsAlertPoliciesService) Patch(name string, alertpolicy *AlertPolicy) *ProjectsAlertPoliciesPatchCall { - c := &ProjectsAlertPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.alertpolicy = alertpolicy - return c -} - -// UpdateMask sets the optional parameter "updateMask": A list of -// alerting policy field names. If this field is not empty, each listed -// field in the existing alerting policy is set to the value of the -// corresponding field in the supplied policy (alert_policy), or to the -// field's default value if the field is not in the supplied alerting -// policy. Fields not listed retain their previous value.Examples of -// valid field masks include display_name, documentation, -// documentation.content, documentation.mime_type, user_labels, -// user_label.nameofkey, enabled, conditions, combiner, etc.If this -// field is empty, then the supplied alerting policy replaces the -// existing policy. It is the same as deleting the existing policy and -// adding the supplied policy, except for the following: -// The new policy will have the same [ALERT_POLICY_ID] as the former -// policy. This gives you continuity with the former policy in your -// notifications and incidents. -// Conditions in the new policy will keep their former [CONDITION_ID] if -// the supplied condition includes the name field with that -// [CONDITION_ID]. If the supplied condition omits the name field, then -// a new [CONDITION_ID] is created. -func (c *ProjectsAlertPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsAlertPoliciesPatchCall { - 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 *ProjectsAlertPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsAlertPoliciesPatchCall { - 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 *ProjectsAlertPoliciesPatchCall) Context(ctx context.Context) *ProjectsAlertPoliciesPatchCall { - 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 *ProjectsAlertPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsAlertPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.alertpolicy) - 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, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.alertPolicies.patch" call. -// Exactly one of *AlertPolicy or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AlertPolicy.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 *ProjectsAlertPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*AlertPolicy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AlertPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an alerting policy. You can either replace the entire policy with a new one or replace only certain fields in the current alerting policy by specifying the fields to be updated via updateMask. Returns the updated alerting policy.", - // "flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}", - // "httpMethod": "PATCH", - // "id": "monitoring.projects.alertPolicies.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required if the policy exists. The resource name for this policy. The syntax is:\nprojects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]\n[ALERT_POLICY_ID] is assigned by Stackdriver Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request.", - // "location": "path", - // "pattern": "^projects/[^/]+/alertPolicies/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert_policy), or to the field's default value if the field is not in the supplied alerting policy. Fields not listed retain their previous value.Examples of valid field masks include display_name, documentation, documentation.content, documentation.mime_type, user_labels, user_label.nameofkey, enabled, conditions, combiner, etc.If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following:\nThe new policy will have the same [ALERT_POLICY_ID] as the former policy. This gives you continuity with the former policy in your notifications and incidents.\nConditions in the new policy will keep their former [CONDITION_ID] if the supplied condition includes the name field with that [CONDITION_ID]. If the supplied condition omits the name field, then a new [CONDITION_ID] is created.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "request": { - // "$ref": "AlertPolicy" - // }, - // "response": { - // "$ref": "AlertPolicy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.collectdTimeSeries.create": - -type ProjectsCollectdTimeSeriesCreateCall struct { - s *Service - name string - createcollectdtimeseriesrequest *CreateCollectdTimeSeriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Stackdriver Monitoring Agent only: Creates a new time -// series. -func (r *ProjectsCollectdTimeSeriesService) Create(name string, createcollectdtimeseriesrequest *CreateCollectdTimeSeriesRequest) *ProjectsCollectdTimeSeriesCreateCall { - c := &ProjectsCollectdTimeSeriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.createcollectdtimeseriesrequest = createcollectdtimeseriesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsCollectdTimeSeriesCreateCall) Fields(s ...googleapi.Field) *ProjectsCollectdTimeSeriesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsCollectdTimeSeriesCreateCall) Context(ctx context.Context) *ProjectsCollectdTimeSeriesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsCollectdTimeSeriesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsCollectdTimeSeriesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.createcollectdtimeseriesrequest) - 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, "v3/{+name}/collectdTimeSeries") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.collectdTimeSeries.create" call. -// Exactly one of *CreateCollectdTimeSeriesResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *CreateCollectdTimeSeriesResponse.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 *ProjectsCollectdTimeSeriesCreateCall) Do(opts ...googleapi.CallOption) (*CreateCollectdTimeSeriesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CreateCollectdTimeSeriesResponse{ - 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": "Stackdriver Monitoring Agent only: Creates a new time series.\u003caside class=\"caution\"\u003eThis method is only for use by the Stackdriver Monitoring Agent. Use projects.timeSeries.create instead.\u003c/aside\u003e", - // "flatPath": "v3/projects/{projectsId}/collectdTimeSeries", - // "httpMethod": "POST", - // "id": "monitoring.projects.collectdTimeSeries.create", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The project in which to create the time series. The format is \"projects/PROJECT_ID_OR_NUMBER\".", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}/collectdTimeSeries", - // "request": { - // "$ref": "CreateCollectdTimeSeriesRequest" - // }, - // "response": { - // "$ref": "CreateCollectdTimeSeriesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.write" - // ] - // } - -} - -// method id "monitoring.projects.groups.create": - -type ProjectsGroupsCreateCall struct { - s *Service - name string - group *Group - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new group. -func (r *ProjectsGroupsService) Create(name string, group *Group) *ProjectsGroupsCreateCall { - c := &ProjectsGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.group = group - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, -// validate this request but do not create the group. -func (c *ProjectsGroupsCreateCall) ValidateOnly(validateOnly bool) *ProjectsGroupsCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - 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 *ProjectsGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsGroupsCreateCall { - 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 *ProjectsGroupsCreateCall) Context(ctx context.Context) *ProjectsGroupsCreateCall { - 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 *ProjectsGroupsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGroupsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.group) - 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, "v3/{+name}/groups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.groups.create" call. -// Exactly one of *Group or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Group.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 *ProjectsGroupsCreateCall) Do(opts ...googleapi.CallOption) (*Group, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Group{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new group.", - // "flatPath": "v3/projects/{projectsId}/groups", - // "httpMethod": "POST", - // "id": "monitoring.projects.groups.create", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The project in which to create the group. The format is \"projects/{project_id_or_number}\".", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "validateOnly": { - // "description": "If true, validate this request but do not create the group.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "v3/{+name}/groups", - // "request": { - // "$ref": "Group" - // }, - // "response": { - // "$ref": "Group" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.groups.delete": - -type ProjectsGroupsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes an existing group. -func (r *ProjectsGroupsService) Delete(name string) *ProjectsGroupsDeleteCall { - c := &ProjectsGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsGroupsDeleteCall { - 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 *ProjectsGroupsDeleteCall) Context(ctx context.Context) *ProjectsGroupsDeleteCall { - 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 *ProjectsGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.groups.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes an existing group.", - // "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", - // "httpMethod": "DELETE", - // "id": "monitoring.projects.groups.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The group to delete. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", - // "location": "path", - // "pattern": "^projects/[^/]+/groups/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.groups.get": - -type ProjectsGroupsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a single group. -func (r *ProjectsGroupsService) Get(name string) *ProjectsGroupsGetCall { - c := &ProjectsGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsGroupsGetCall { - 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 *ProjectsGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsGroupsGetCall { - 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 *ProjectsGroupsGetCall) Context(ctx context.Context) *ProjectsGroupsGetCall { - 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 *ProjectsGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.groups.get" call. -// Exactly one of *Group or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Group.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 *ProjectsGroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Group{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets a single group.", - // "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", - // "httpMethod": "GET", - // "id": "monitoring.projects.groups.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The group to retrieve. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", - // "location": "path", - // "pattern": "^projects/[^/]+/groups/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "Group" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read" - // ] - // } - -} - -// method id "monitoring.projects.groups.list": - -type ProjectsGroupsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the existing groups. -func (r *ProjectsGroupsService) List(name string) *ProjectsGroupsListCall { - c := &ProjectsGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// AncestorsOfGroup sets the optional parameter "ancestorsOfGroup": A -// group name: "projects/{project_id_or_number}/groups/{group_id}". -// Returns groups that are ancestors of the specified group. The groups -// are returned in order, starting with the immediate parent and ending -// with the most distant ancestor. If the specified group has no -// immediate parent, the results are empty. -func (c *ProjectsGroupsListCall) AncestorsOfGroup(ancestorsOfGroup string) *ProjectsGroupsListCall { - c.urlParams_.Set("ancestorsOfGroup", ancestorsOfGroup) - return c -} - -// ChildrenOfGroup sets the optional parameter "childrenOfGroup": A -// group name: "projects/{project_id_or_number}/groups/{group_id}". -// Returns groups whose parentName field contains the group name. If no -// groups have this parent, the results are empty. -func (c *ProjectsGroupsListCall) ChildrenOfGroup(childrenOfGroup string) *ProjectsGroupsListCall { - c.urlParams_.Set("childrenOfGroup", childrenOfGroup) - return c -} - -// DescendantsOfGroup sets the optional parameter "descendantsOfGroup": -// A group name: "projects/{project_id_or_number}/groups/{group_id}". -// Returns the descendants of the specified group. This is a superset of -// the results returned by the childrenOfGroup filter, and includes -// children-of-children, and so forth. -func (c *ProjectsGroupsListCall) DescendantsOfGroup(descendantsOfGroup string) *ProjectsGroupsListCall { - c.urlParams_.Set("descendantsOfGroup", descendantsOfGroup) - return c -} - -// PageSize sets the optional parameter "pageSize": A positive number -// that is the maximum number of results to return. -func (c *ProjectsGroupsListCall) PageSize(pageSize int64) *ProjectsGroupsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If this field is -// not empty then it must contain the nextPageToken value returned by a -// previous call to this method. Using this field causes the method to -// return additional results from the previous method call. -func (c *ProjectsGroupsListCall) PageToken(pageToken string) *ProjectsGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsGroupsListCall) Fields(s ...googleapi.Field) *ProjectsGroupsListCall { - 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 *ProjectsGroupsListCall) IfNoneMatch(entityTag string) *ProjectsGroupsListCall { - 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 *ProjectsGroupsListCall) Context(ctx context.Context) *ProjectsGroupsListCall { - 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 *ProjectsGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/groups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.groups.list" call. -// Exactly one of *ListGroupsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListGroupsResponse.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 *ProjectsGroupsListCall) Do(opts ...googleapi.CallOption) (*ListGroupsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListGroupsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the existing groups.", - // "flatPath": "v3/projects/{projectsId}/groups", - // "httpMethod": "GET", - // "id": "monitoring.projects.groups.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "ancestorsOfGroup": { - // "description": "A group name: \"projects/{project_id_or_number}/groups/{group_id}\". Returns groups that are ancestors of the specified group. The groups are returned in order, starting with the immediate parent and ending with the most distant ancestor. If the specified group has no immediate parent, the results are empty.", - // "location": "query", - // "type": "string" - // }, - // "childrenOfGroup": { - // "description": "A group name: \"projects/{project_id_or_number}/groups/{group_id}\". Returns groups whose parentName field contains the group name. If no groups have this parent, the results are empty.", - // "location": "query", - // "type": "string" - // }, - // "descendantsOfGroup": { - // "description": "A group name: \"projects/{project_id_or_number}/groups/{group_id}\". Returns the descendants of the specified group. This is a superset of the results returned by the childrenOfGroup filter, and includes children-of-children, and so forth.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The project whose groups are to be listed. The format is \"projects/{project_id_or_number}\".", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "A positive number that is the maximum number of results to return.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/{+name}/groups", - // "response": { - // "$ref": "ListGroupsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsGroupsListCall) Pages(ctx context.Context, f func(*ListGroupsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "monitoring.projects.groups.update": - -type ProjectsGroupsUpdateCall struct { - s *Service - name string - group *Group - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an existing group. You can change any group -// attributes except name. -func (r *ProjectsGroupsService) Update(name string, group *Group) *ProjectsGroupsUpdateCall { - c := &ProjectsGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.group = group - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, -// validate this request but do not update the existing group. -func (c *ProjectsGroupsUpdateCall) ValidateOnly(validateOnly bool) *ProjectsGroupsUpdateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - 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 *ProjectsGroupsUpdateCall) Fields(s ...googleapi.Field) *ProjectsGroupsUpdateCall { - 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 *ProjectsGroupsUpdateCall) Context(ctx context.Context) *ProjectsGroupsUpdateCall { - 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 *ProjectsGroupsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGroupsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.group) - 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, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.groups.update" call. -// Exactly one of *Group or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Group.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 *ProjectsGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*Group, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Group{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an existing group. You can change any group attributes except name.", - // "flatPath": "v3/projects/{projectsId}/groups/{groupsId}", - // "httpMethod": "PUT", - // "id": "monitoring.projects.groups.update", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Output only. The name of this group. The format is \"projects/{project_id_or_number}/groups/{group_id}\". When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique {group_id} that is generated automatically.", - // "location": "path", - // "pattern": "^projects/[^/]+/groups/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "validateOnly": { - // "description": "If true, validate this request but do not update the existing group.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "v3/{+name}", - // "request": { - // "$ref": "Group" - // }, - // "response": { - // "$ref": "Group" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.groups.members.list": - -type ProjectsGroupsMembersListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the monitored resources that are members of a group. -func (r *ProjectsGroupsMembersService) List(name string) *ProjectsGroupsMembersListCall { - c := &ProjectsGroupsMembersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": An optional list filter -// describing the members to be returned. The filter may reference the -// type, labels, and metadata of monitored resources that comprise the -// group. For example, to return only resources representing Compute -// Engine VM instances, use this filter: -// resource.type = "gce_instance" -func (c *ProjectsGroupsMembersListCall) Filter(filter string) *ProjectsGroupsMembersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IntervalEndTime sets the optional parameter "interval.endTime": -// Required. The end of the time interval. -func (c *ProjectsGroupsMembersListCall) IntervalEndTime(intervalEndTime string) *ProjectsGroupsMembersListCall { - c.urlParams_.Set("interval.endTime", intervalEndTime) - return c -} - -// IntervalStartTime sets the optional parameter "interval.startTime": -// The beginning of the time interval. The default value for the start -// time is the end time. The start time must not be later than the end -// time. -func (c *ProjectsGroupsMembersListCall) IntervalStartTime(intervalStartTime string) *ProjectsGroupsMembersListCall { - c.urlParams_.Set("interval.startTime", intervalStartTime) - return c -} - -// PageSize sets the optional parameter "pageSize": A positive number -// that is the maximum number of results to return. -func (c *ProjectsGroupsMembersListCall) PageSize(pageSize int64) *ProjectsGroupsMembersListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If this field is -// not empty then it must contain the nextPageToken value returned by a -// previous call to this method. Using this field causes the method to -// return additional results from the previous method call. -func (c *ProjectsGroupsMembersListCall) PageToken(pageToken string) *ProjectsGroupsMembersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsGroupsMembersListCall) Fields(s ...googleapi.Field) *ProjectsGroupsMembersListCall { - 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 *ProjectsGroupsMembersListCall) IfNoneMatch(entityTag string) *ProjectsGroupsMembersListCall { - 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 *ProjectsGroupsMembersListCall) Context(ctx context.Context) *ProjectsGroupsMembersListCall { - 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 *ProjectsGroupsMembersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGroupsMembersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/members") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.groups.members.list" call. -// Exactly one of *ListGroupMembersResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListGroupMembersResponse.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 *ProjectsGroupsMembersListCall) Do(opts ...googleapi.CallOption) (*ListGroupMembersResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListGroupMembersResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the monitored resources that are members of a group.", - // "flatPath": "v3/projects/{projectsId}/groups/{groupsId}/members", - // "httpMethod": "GET", - // "id": "monitoring.projects.groups.members.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "An optional list filter describing the members to be returned. The filter may reference the type, labels, and metadata of monitored resources that comprise the group. For example, to return only resources representing Compute Engine VM instances, use this filter:\nresource.type = \"gce_instance\"\n", - // "location": "query", - // "type": "string" - // }, - // "interval.endTime": { - // "description": "Required. The end of the time interval.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "interval.startTime": { - // "description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The group whose members are listed. The format is \"projects/{project_id_or_number}/groups/{group_id}\".", - // "location": "path", - // "pattern": "^projects/[^/]+/groups/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "A positive number that is the maximum number of results to return.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/{+name}/members", - // "response": { - // "$ref": "ListGroupMembersResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsGroupsMembersListCall) Pages(ctx context.Context, f func(*ListGroupMembersResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "monitoring.projects.metricDescriptors.create": - -type ProjectsMetricDescriptorsCreateCall struct { - s *Service - name string - metricdescriptor *MetricDescriptor - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new metric descriptor. User-created metric -// descriptors define custom metrics. -func (r *ProjectsMetricDescriptorsService) Create(name string, metricdescriptor *MetricDescriptor) *ProjectsMetricDescriptorsCreateCall { - c := &ProjectsMetricDescriptorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.metricdescriptor = metricdescriptor - 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 *ProjectsMetricDescriptorsCreateCall) Fields(s ...googleapi.Field) *ProjectsMetricDescriptorsCreateCall { - 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 *ProjectsMetricDescriptorsCreateCall) Context(ctx context.Context) *ProjectsMetricDescriptorsCreateCall { - 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 *ProjectsMetricDescriptorsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMetricDescriptorsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.metricdescriptor) - 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, "v3/{+name}/metricDescriptors") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.metricDescriptors.create" call. -// Exactly one of *MetricDescriptor or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *MetricDescriptor.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 *ProjectsMetricDescriptorsCreateCall) Do(opts ...googleapi.CallOption) (*MetricDescriptor, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MetricDescriptor{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new metric descriptor. User-created metric descriptors define custom metrics.", - // "flatPath": "v3/projects/{projectsId}/metricDescriptors", - // "httpMethod": "POST", - // "id": "monitoring.projects.metricDescriptors.create", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}/metricDescriptors", - // "request": { - // "$ref": "MetricDescriptor" - // }, - // "response": { - // "$ref": "MetricDescriptor" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.write" - // ] - // } - -} - -// method id "monitoring.projects.metricDescriptors.delete": - -type ProjectsMetricDescriptorsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a metric descriptor. Only user-created custom metrics -// can be deleted. -func (r *ProjectsMetricDescriptorsService) Delete(name string) *ProjectsMetricDescriptorsDeleteCall { - c := &ProjectsMetricDescriptorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsMetricDescriptorsDeleteCall) Fields(s ...googleapi.Field) *ProjectsMetricDescriptorsDeleteCall { - 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 *ProjectsMetricDescriptorsDeleteCall) Context(ctx context.Context) *ProjectsMetricDescriptorsDeleteCall { - 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 *ProjectsMetricDescriptorsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMetricDescriptorsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.metricDescriptors.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsMetricDescriptorsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a metric descriptor. Only user-created custom metrics can be deleted.", - // "flatPath": "v3/projects/{projectsId}/metricDescriptors/{metricDescriptorsId}", - // "httpMethod": "DELETE", - // "id": "monitoring.projects.metricDescriptors.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The metric descriptor on which to execute the request. The format is \"projects/{project_id_or_number}/metricDescriptors/{metric_id}\". An example of {metric_id} is: \"custom.googleapis.com/my_test_metric\".", - // "location": "path", - // "pattern": "^projects/[^/]+/metricDescriptors/.+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.metricDescriptors.get": - -type ProjectsMetricDescriptorsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a single metric descriptor. This method does not require a -// Stackdriver account. -func (r *ProjectsMetricDescriptorsService) Get(name string) *ProjectsMetricDescriptorsGetCall { - c := &ProjectsMetricDescriptorsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsMetricDescriptorsGetCall) Fields(s ...googleapi.Field) *ProjectsMetricDescriptorsGetCall { - 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 *ProjectsMetricDescriptorsGetCall) IfNoneMatch(entityTag string) *ProjectsMetricDescriptorsGetCall { - 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 *ProjectsMetricDescriptorsGetCall) Context(ctx context.Context) *ProjectsMetricDescriptorsGetCall { - 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 *ProjectsMetricDescriptorsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMetricDescriptorsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.metricDescriptors.get" call. -// Exactly one of *MetricDescriptor or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *MetricDescriptor.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 *ProjectsMetricDescriptorsGetCall) Do(opts ...googleapi.CallOption) (*MetricDescriptor, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MetricDescriptor{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets a single metric descriptor. This method does not require a Stackdriver account.", - // "flatPath": "v3/projects/{projectsId}/metricDescriptors/{metricDescriptorsId}", - // "httpMethod": "GET", - // "id": "monitoring.projects.metricDescriptors.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The metric descriptor on which to execute the request. The format is \"projects/{project_id_or_number}/metricDescriptors/{metric_id}\". An example value of {metric_id} is \"compute.googleapis.com/instance/disk/read_bytes_count\".", - // "location": "path", - // "pattern": "^projects/[^/]+/metricDescriptors/.+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "MetricDescriptor" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read", - // "https://www.googleapis.com/auth/monitoring.write" - // ] - // } - -} - -// method id "monitoring.projects.metricDescriptors.list": - -type ProjectsMetricDescriptorsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists metric descriptors that match a filter. This method does -// not require a Stackdriver account. -func (r *ProjectsMetricDescriptorsService) List(name string) *ProjectsMetricDescriptorsListCall { - c := &ProjectsMetricDescriptorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": If this field is empty, -// all custom and system-defined metric descriptors are returned. -// Otherwise, the filter specifies which metric descriptors are to be -// returned. For example, the following filter matches all custom -// metrics: -// metric.type = starts_with("custom.googleapis.com/") -func (c *ProjectsMetricDescriptorsListCall) Filter(filter string) *ProjectsMetricDescriptorsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": A positive number -// that is the maximum number of results to return. -func (c *ProjectsMetricDescriptorsListCall) PageSize(pageSize int64) *ProjectsMetricDescriptorsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If this field is -// not empty then it must contain the nextPageToken value returned by a -// previous call to this method. Using this field causes the method to -// return additional results from the previous method call. -func (c *ProjectsMetricDescriptorsListCall) PageToken(pageToken string) *ProjectsMetricDescriptorsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsMetricDescriptorsListCall) Fields(s ...googleapi.Field) *ProjectsMetricDescriptorsListCall { - 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 *ProjectsMetricDescriptorsListCall) IfNoneMatch(entityTag string) *ProjectsMetricDescriptorsListCall { - 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 *ProjectsMetricDescriptorsListCall) Context(ctx context.Context) *ProjectsMetricDescriptorsListCall { - 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 *ProjectsMetricDescriptorsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMetricDescriptorsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/metricDescriptors") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.metricDescriptors.list" call. -// Exactly one of *ListMetricDescriptorsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListMetricDescriptorsResponse.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 *ProjectsMetricDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListMetricDescriptorsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListMetricDescriptorsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists metric descriptors that match a filter. This method does not require a Stackdriver account.", - // "flatPath": "v3/projects/{projectsId}/metricDescriptors", - // "httpMethod": "GET", - // "id": "monitoring.projects.metricDescriptors.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "If this field is empty, all custom and system-defined metric descriptors are returned. Otherwise, the filter specifies which metric descriptors are to be returned. For example, the following filter matches all custom metrics:\nmetric.type = starts_with(\"custom.googleapis.com/\")\n", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "A positive number that is the maximum number of results to return.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/{+name}/metricDescriptors", - // "response": { - // "$ref": "ListMetricDescriptorsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read", - // "https://www.googleapis.com/auth/monitoring.write" - // ] - // } - -} - -// 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 *ProjectsMetricDescriptorsListCall) Pages(ctx context.Context, f func(*ListMetricDescriptorsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "monitoring.projects.monitoredResourceDescriptors.get": - -type ProjectsMonitoredResourceDescriptorsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a single monitored resource descriptor. This method does -// not require a Stackdriver account. -func (r *ProjectsMonitoredResourceDescriptorsService) Get(name string) *ProjectsMonitoredResourceDescriptorsGetCall { - c := &ProjectsMonitoredResourceDescriptorsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsMonitoredResourceDescriptorsGetCall) Fields(s ...googleapi.Field) *ProjectsMonitoredResourceDescriptorsGetCall { - 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 *ProjectsMonitoredResourceDescriptorsGetCall) IfNoneMatch(entityTag string) *ProjectsMonitoredResourceDescriptorsGetCall { - 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 *ProjectsMonitoredResourceDescriptorsGetCall) Context(ctx context.Context) *ProjectsMonitoredResourceDescriptorsGetCall { - 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 *ProjectsMonitoredResourceDescriptorsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMonitoredResourceDescriptorsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.monitoredResourceDescriptors.get" call. -// Exactly one of *MonitoredResourceDescriptor or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *MonitoredResourceDescriptor.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 *ProjectsMonitoredResourceDescriptorsGetCall) Do(opts ...googleapi.CallOption) (*MonitoredResourceDescriptor, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MonitoredResourceDescriptor{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets a single monitored resource descriptor. This method does not require a Stackdriver account.", - // "flatPath": "v3/projects/{projectsId}/monitoredResourceDescriptors/{monitoredResourceDescriptorsId}", - // "httpMethod": "GET", - // "id": "monitoring.projects.monitoredResourceDescriptors.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The monitored resource descriptor to get. The format is \"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}\". The {resource_type} is a predefined type, such as cloudsql_database.", - // "location": "path", - // "pattern": "^projects/[^/]+/monitoredResourceDescriptors/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "MonitoredResourceDescriptor" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read", - // "https://www.googleapis.com/auth/monitoring.write" - // ] - // } - -} - -// method id "monitoring.projects.monitoredResourceDescriptors.list": - -type ProjectsMonitoredResourceDescriptorsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists monitored resource descriptors that match a filter. This -// method does not require a Stackdriver account. -func (r *ProjectsMonitoredResourceDescriptorsService) List(name string) *ProjectsMonitoredResourceDescriptorsListCall { - c := &ProjectsMonitoredResourceDescriptorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": An optional filter -// describing the descriptors to be returned. The filter can reference -// the descriptor's type and labels. For example, the following filter -// returns only Google Compute Engine descriptors that have an id -// label: -// resource.type = starts_with("gce_") AND resource.label:id -func (c *ProjectsMonitoredResourceDescriptorsListCall) Filter(filter string) *ProjectsMonitoredResourceDescriptorsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": A positive number -// that is the maximum number of results to return. -func (c *ProjectsMonitoredResourceDescriptorsListCall) PageSize(pageSize int64) *ProjectsMonitoredResourceDescriptorsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If this field is -// not empty then it must contain the nextPageToken value returned by a -// previous call to this method. Using this field causes the method to -// return additional results from the previous method call. -func (c *ProjectsMonitoredResourceDescriptorsListCall) PageToken(pageToken string) *ProjectsMonitoredResourceDescriptorsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsMonitoredResourceDescriptorsListCall) Fields(s ...googleapi.Field) *ProjectsMonitoredResourceDescriptorsListCall { - 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 *ProjectsMonitoredResourceDescriptorsListCall) IfNoneMatch(entityTag string) *ProjectsMonitoredResourceDescriptorsListCall { - 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 *ProjectsMonitoredResourceDescriptorsListCall) Context(ctx context.Context) *ProjectsMonitoredResourceDescriptorsListCall { - 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 *ProjectsMonitoredResourceDescriptorsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMonitoredResourceDescriptorsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/monitoredResourceDescriptors") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.monitoredResourceDescriptors.list" call. -// Exactly one of *ListMonitoredResourceDescriptorsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *ListMonitoredResourceDescriptorsResponse.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 *ProjectsMonitoredResourceDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListMonitoredResourceDescriptorsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.", - // "flatPath": "v3/projects/{projectsId}/monitoredResourceDescriptors", - // "httpMethod": "GET", - // "id": "monitoring.projects.monitoredResourceDescriptors.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "An optional filter describing the descriptors to be returned. The filter can reference the descriptor's type and labels. For example, the following filter returns only Google Compute Engine descriptors that have an id label:\nresource.type = starts_with(\"gce_\") AND resource.label:id\n", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "A positive number that is the maximum number of results to return.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/{+name}/monitoredResourceDescriptors", - // "response": { - // "$ref": "ListMonitoredResourceDescriptorsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read", - // "https://www.googleapis.com/auth/monitoring.write" - // ] - // } - -} - -// 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 *ProjectsMonitoredResourceDescriptorsListCall) Pages(ctx context.Context, f func(*ListMonitoredResourceDescriptorsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "monitoring.projects.notificationChannelDescriptors.get": - -type ProjectsNotificationChannelDescriptorsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a single channel descriptor. The descriptor indicates which -// fields are expected / permitted for a notification channel of the -// given type. -func (r *ProjectsNotificationChannelDescriptorsService) Get(name string) *ProjectsNotificationChannelDescriptorsGetCall { - c := &ProjectsNotificationChannelDescriptorsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsNotificationChannelDescriptorsGetCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelDescriptorsGetCall { - 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 *ProjectsNotificationChannelDescriptorsGetCall) IfNoneMatch(entityTag string) *ProjectsNotificationChannelDescriptorsGetCall { - 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 *ProjectsNotificationChannelDescriptorsGetCall) Context(ctx context.Context) *ProjectsNotificationChannelDescriptorsGetCall { - 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 *ProjectsNotificationChannelDescriptorsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsNotificationChannelDescriptorsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.notificationChannelDescriptors.get" call. -// Exactly one of *NotificationChannelDescriptor or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *NotificationChannelDescriptor.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 *ProjectsNotificationChannelDescriptorsGetCall) Do(opts ...googleapi.CallOption) (*NotificationChannelDescriptor, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &NotificationChannelDescriptor{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.", - // "flatPath": "v3/projects/{projectsId}/notificationChannelDescriptors/{notificationChannelDescriptorsId}", - // "httpMethod": "GET", - // "id": "monitoring.projects.notificationChannelDescriptors.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The channel type for which to execute the request. The format is projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}.", - // "location": "path", - // "pattern": "^projects/[^/]+/notificationChannelDescriptors/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "NotificationChannelDescriptor" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read" - // ] - // } - -} - -// method id "monitoring.projects.notificationChannelDescriptors.list": - -type ProjectsNotificationChannelDescriptorsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the descriptors for supported channel types. The use of -// descriptors makes it possible for new channel types to be dynamically -// added. -func (r *ProjectsNotificationChannelDescriptorsService) List(name string) *ProjectsNotificationChannelDescriptorsListCall { - c := &ProjectsNotificationChannelDescriptorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. If not set to a positive -// number, a reasonable value will be chosen by the service. -func (c *ProjectsNotificationChannelDescriptorsListCall) PageSize(pageSize int64) *ProjectsNotificationChannelDescriptorsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If non-empty, -// page_token must contain a value returned as the next_page_token in a -// previous response to request the next set of results. -func (c *ProjectsNotificationChannelDescriptorsListCall) PageToken(pageToken string) *ProjectsNotificationChannelDescriptorsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsNotificationChannelDescriptorsListCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelDescriptorsListCall { - 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 *ProjectsNotificationChannelDescriptorsListCall) IfNoneMatch(entityTag string) *ProjectsNotificationChannelDescriptorsListCall { - 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 *ProjectsNotificationChannelDescriptorsListCall) Context(ctx context.Context) *ProjectsNotificationChannelDescriptorsListCall { - 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 *ProjectsNotificationChannelDescriptorsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsNotificationChannelDescriptorsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/notificationChannelDescriptors") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.notificationChannelDescriptors.list" call. -// Exactly one of *ListNotificationChannelDescriptorsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *ListNotificationChannelDescriptorsResponse.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 *ProjectsNotificationChannelDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListNotificationChannelDescriptorsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListNotificationChannelDescriptorsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.", - // "flatPath": "v3/projects/{projectsId}/notificationChannelDescriptors", - // "httpMethod": "GET", - // "id": "monitoring.projects.notificationChannelDescriptors.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is:\nprojects/[PROJECT_ID]\nNote that this names the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the GetNotificationChannelDescriptor operation, instead.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be chosen by the service.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "If non-empty, page_token must contain a value returned as the next_page_token in a previous response to request the next set of results.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/{+name}/notificationChannelDescriptors", - // "response": { - // "$ref": "ListNotificationChannelDescriptorsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsNotificationChannelDescriptorsListCall) Pages(ctx context.Context, f func(*ListNotificationChannelDescriptorsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "monitoring.projects.notificationChannels.create": - -type ProjectsNotificationChannelsCreateCall struct { - s *Service - name string - notificationchannel *NotificationChannel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new notification channel, representing a single -// notification endpoint such as an email address, SMS number, or -// PagerDuty service. -func (r *ProjectsNotificationChannelsService) Create(name string, notificationchannel *NotificationChannel) *ProjectsNotificationChannelsCreateCall { - c := &ProjectsNotificationChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.notificationchannel = notificationchannel - 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 *ProjectsNotificationChannelsCreateCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsCreateCall { - 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 *ProjectsNotificationChannelsCreateCall) Context(ctx context.Context) *ProjectsNotificationChannelsCreateCall { - 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 *ProjectsNotificationChannelsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsNotificationChannelsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.notificationchannel) - 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, "v3/{+name}/notificationChannels") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.notificationChannels.create" call. -// Exactly one of *NotificationChannel or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *NotificationChannel.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 *ProjectsNotificationChannelsCreateCall) Do(opts ...googleapi.CallOption) (*NotificationChannel, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &NotificationChannel{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new notification channel, representing a single notification endpoint such as an email address, SMS number, or PagerDuty service.", - // "flatPath": "v3/projects/{projectsId}/notificationChannels", - // "httpMethod": "POST", - // "id": "monitoring.projects.notificationChannels.create", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The project on which to execute the request. The format is:\nprojects/[PROJECT_ID]\nNote that this names the container into which the channel will be written. This does not name the newly created channel. The resulting channel's name will have a normalized version of this field as a prefix, but will add /notificationChannels/[CHANNEL_ID] to identify the channel.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}/notificationChannels", - // "request": { - // "$ref": "NotificationChannel" - // }, - // "response": { - // "$ref": "NotificationChannel" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.notificationChannels.delete": - -type ProjectsNotificationChannelsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a notification channel. -func (r *ProjectsNotificationChannelsService) Delete(name string) *ProjectsNotificationChannelsDeleteCall { - c := &ProjectsNotificationChannelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Force sets the optional parameter "force": If true, the notification -// channel will be deleted regardless of its use in alert policies (the -// policies will be updated to remove the channel). If false, channels -// that are still referenced by an existing alerting policy will fail to -// be deleted in a delete operation. -func (c *ProjectsNotificationChannelsDeleteCall) Force(force bool) *ProjectsNotificationChannelsDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - 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 *ProjectsNotificationChannelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsDeleteCall { - 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 *ProjectsNotificationChannelsDeleteCall) Context(ctx context.Context) *ProjectsNotificationChannelsDeleteCall { - 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 *ProjectsNotificationChannelsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsNotificationChannelsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.notificationChannels.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsNotificationChannelsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a notification channel.", - // "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}", - // "httpMethod": "DELETE", - // "id": "monitoring.projects.notificationChannels.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "force": { - // "description": "If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.", - // "location": "query", - // "type": "boolean" - // }, - // "name": { - // "description": "The channel for which to execute the request. The format is projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID].", - // "location": "path", - // "pattern": "^projects/[^/]+/notificationChannels/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.notificationChannels.get": - -type ProjectsNotificationChannelsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a single notification channel. The channel includes the -// relevant configuration details with which the channel was created. -// However, the response may truncate or omit passwords, API keys, or -// other private key matter and thus the response may not be 100% -// identical to the information that was supplied in the call to the -// create method. -func (r *ProjectsNotificationChannelsService) Get(name string) *ProjectsNotificationChannelsGetCall { - c := &ProjectsNotificationChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsNotificationChannelsGetCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsGetCall { - 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 *ProjectsNotificationChannelsGetCall) IfNoneMatch(entityTag string) *ProjectsNotificationChannelsGetCall { - 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 *ProjectsNotificationChannelsGetCall) Context(ctx context.Context) *ProjectsNotificationChannelsGetCall { - 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 *ProjectsNotificationChannelsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsNotificationChannelsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.notificationChannels.get" call. -// Exactly one of *NotificationChannel or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *NotificationChannel.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 *ProjectsNotificationChannelsGetCall) Do(opts ...googleapi.CallOption) (*NotificationChannel, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &NotificationChannel{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets a single notification channel. The channel includes the relevant configuration details with which the channel was created. However, the response may truncate or omit passwords, API keys, or other private key matter and thus the response may not be 100% identical to the information that was supplied in the call to the create method.", - // "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}", - // "httpMethod": "GET", - // "id": "monitoring.projects.notificationChannels.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The channel for which to execute the request. The format is projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID].", - // "location": "path", - // "pattern": "^projects/[^/]+/notificationChannels/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "NotificationChannel" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read" - // ] - // } - -} - -// method id "monitoring.projects.notificationChannels.getVerificationCode": - -type ProjectsNotificationChannelsGetVerificationCodeCall struct { - s *Service - name string - getnotificationchannelverificationcoderequest *GetNotificationChannelVerificationCodeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetVerificationCode: Requests a verification code for an already -// verified channel that can then be used in a call to -// VerifyNotificationChannel() on a different channel with an equivalent -// identity in the same or in a different project. This makes it -// possible to copy a channel between projects without requiring manual -// reverification of the channel. If the channel is not in the verified -// state, this method will fail (in other words, this may only be used -// if the SendNotificationChannelVerificationCode and -// VerifyNotificationChannel paths have already been used to put the -// given channel into the verified state).There is no guarantee that the -// verification codes returned by this method will be of a similar -// structure or form as the ones that are delivered to the channel via -// SendNotificationChannelVerificationCode; while -// VerifyNotificationChannel() will recognize both the codes delivered -// via SendNotificationChannelVerificationCode() and returned from -// GetNotificationChannelVerificationCode(), it is typically the case -// that the verification codes delivered via -// SendNotificationChannelVerificationCode() will be shorter and also -// have a shorter expiration (e.g. codes such as "G-123456") whereas -// GetVerificationCode() will typically return a much longer, websafe -// base 64 encoded string that has a longer expiration time. -func (r *ProjectsNotificationChannelsService) GetVerificationCode(name string, getnotificationchannelverificationcoderequest *GetNotificationChannelVerificationCodeRequest) *ProjectsNotificationChannelsGetVerificationCodeCall { - c := &ProjectsNotificationChannelsGetVerificationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.getnotificationchannelverificationcoderequest = getnotificationchannelverificationcoderequest - 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 *ProjectsNotificationChannelsGetVerificationCodeCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsGetVerificationCodeCall { - 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 *ProjectsNotificationChannelsGetVerificationCodeCall) Context(ctx context.Context) *ProjectsNotificationChannelsGetVerificationCodeCall { - 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 *ProjectsNotificationChannelsGetVerificationCodeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsNotificationChannelsGetVerificationCodeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.getnotificationchannelverificationcoderequest) - 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, "v3/{+name}:getVerificationCode") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.notificationChannels.getVerificationCode" call. -// Exactly one of *GetNotificationChannelVerificationCodeResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GetNotificationChannelVerificationCodeResponse.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 *ProjectsNotificationChannelsGetVerificationCodeCall) Do(opts ...googleapi.CallOption) (*GetNotificationChannelVerificationCodeResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GetNotificationChannelVerificationCodeResponse{ - 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": "Requests a verification code for an already verified channel that can then be used in a call to VerifyNotificationChannel() on a different channel with an equivalent identity in the same or in a different project. This makes it possible to copy a channel between projects without requiring manual reverification of the channel. If the channel is not in the verified state, this method will fail (in other words, this may only be used if the SendNotificationChannelVerificationCode and VerifyNotificationChannel paths have already been used to put the given channel into the verified state).There is no guarantee that the verification codes returned by this method will be of a similar structure or form as the ones that are delivered to the channel via SendNotificationChannelVerificationCode; while VerifyNotificationChannel() will recognize both the codes delivered via SendNotificationChannelVerificationCode() and returned from GetNotificationChannelVerificationCode(), it is typically the case that the verification codes delivered via SendNotificationChannelVerificationCode() will be shorter and also have a shorter expiration (e.g. codes such as \"G-123456\") whereas GetVerificationCode() will typically return a much longer, websafe base 64 encoded string that has a longer expiration time.", - // "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:getVerificationCode", - // "httpMethod": "POST", - // "id": "monitoring.projects.notificationChannels.getVerificationCode", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The notification channel for which a verification code is to be generated and retrieved. This must name a channel that is already verified; if the specified channel is not verified, the request will fail.", - // "location": "path", - // "pattern": "^projects/[^/]+/notificationChannels/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}:getVerificationCode", - // "request": { - // "$ref": "GetNotificationChannelVerificationCodeRequest" - // }, - // "response": { - // "$ref": "GetNotificationChannelVerificationCodeResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.notificationChannels.list": - -type ProjectsNotificationChannelsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the notification channels that have been created for the -// project. -func (r *ProjectsNotificationChannelsService) List(name string) *ProjectsNotificationChannelsListCall { - c := &ProjectsNotificationChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": If provided, this field -// specifies the criteria that must be met by notification channels to -// be included in the response.For more details, see sorting and -// filtering. -func (c *ProjectsNotificationChannelsListCall) Filter(filter string) *ProjectsNotificationChannelsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list -// of fields by which to sort the result. Supports the same set of -// fields as in filter. Entries can be prefixed with a minus sign to -// sort in descending rather than ascending order.For more details, see -// sorting and filtering. -func (c *ProjectsNotificationChannelsListCall) OrderBy(orderBy string) *ProjectsNotificationChannelsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. If not set to a positive -// number, a reasonable value will be chosen by the service. -func (c *ProjectsNotificationChannelsListCall) PageSize(pageSize int64) *ProjectsNotificationChannelsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If non-empty, -// page_token must contain a value returned as the next_page_token in a -// previous response to request the next set of results. -func (c *ProjectsNotificationChannelsListCall) PageToken(pageToken string) *ProjectsNotificationChannelsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsNotificationChannelsListCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsListCall { - 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 *ProjectsNotificationChannelsListCall) IfNoneMatch(entityTag string) *ProjectsNotificationChannelsListCall { - 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 *ProjectsNotificationChannelsListCall) Context(ctx context.Context) *ProjectsNotificationChannelsListCall { - 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 *ProjectsNotificationChannelsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsNotificationChannelsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/notificationChannels") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.notificationChannels.list" call. -// Exactly one of *ListNotificationChannelsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListNotificationChannelsResponse.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 *ProjectsNotificationChannelsListCall) Do(opts ...googleapi.CallOption) (*ListNotificationChannelsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListNotificationChannelsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the notification channels that have been created for the project.", - // "flatPath": "v3/projects/{projectsId}/notificationChannels", - // "httpMethod": "GET", - // "id": "monitoring.projects.notificationChannels.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "If provided, this field specifies the criteria that must be met by notification channels to be included in the response.For more details, see sorting and filtering.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The project on which to execute the request. The format is projects/[PROJECT_ID]. That is, this names the container in which to look for the notification channels; it does not name a specific channel. To query a specific channel by REST resource name, use the GetNotificationChannel operation.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "orderBy": { - // "description": "A comma-separated list of fields by which to sort the result. Supports the same set of fields as in filter. Entries can be prefixed with a minus sign to sort in descending rather than ascending order.For more details, see sorting and filtering.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be chosen by the service.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "If non-empty, page_token must contain a value returned as the next_page_token in a previous response to request the next set of results.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/{+name}/notificationChannels", - // "response": { - // "$ref": "ListNotificationChannelsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsNotificationChannelsListCall) Pages(ctx context.Context, f func(*ListNotificationChannelsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "monitoring.projects.notificationChannels.patch": - -type ProjectsNotificationChannelsPatchCall struct { - s *Service - name string - notificationchannel *NotificationChannel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a notification channel. Fields not specified in the -// field mask remain unchanged. -func (r *ProjectsNotificationChannelsService) Patch(name string, notificationchannel *NotificationChannel) *ProjectsNotificationChannelsPatchCall { - c := &ProjectsNotificationChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.notificationchannel = notificationchannel - return c -} - -// UpdateMask sets the optional parameter "updateMask": The fields to -// update. -func (c *ProjectsNotificationChannelsPatchCall) UpdateMask(updateMask string) *ProjectsNotificationChannelsPatchCall { - 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 *ProjectsNotificationChannelsPatchCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsPatchCall { - 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 *ProjectsNotificationChannelsPatchCall) Context(ctx context.Context) *ProjectsNotificationChannelsPatchCall { - 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 *ProjectsNotificationChannelsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsNotificationChannelsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.notificationchannel) - 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, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.notificationChannels.patch" call. -// Exactly one of *NotificationChannel or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *NotificationChannel.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 *ProjectsNotificationChannelsPatchCall) Do(opts ...googleapi.CallOption) (*NotificationChannel, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &NotificationChannel{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a notification channel. Fields not specified in the field mask remain unchanged.", - // "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}", - // "httpMethod": "PATCH", - // "id": "monitoring.projects.notificationChannels.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The full REST resource name for this channel. The syntax is:\nprojects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]\nThe [CHANNEL_ID] is automatically assigned by the server on creation.", - // "location": "path", - // "pattern": "^projects/[^/]+/notificationChannels/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "The fields to update.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "request": { - // "$ref": "NotificationChannel" - // }, - // "response": { - // "$ref": "NotificationChannel" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.notificationChannels.sendVerificationCode": - -type ProjectsNotificationChannelsSendVerificationCodeCall struct { - s *Service - name string - sendnotificationchannelverificationcoderequest *SendNotificationChannelVerificationCodeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SendVerificationCode: Causes a verification code to be delivered to -// the channel. The code can then be supplied in -// VerifyNotificationChannel to verify the channel. -func (r *ProjectsNotificationChannelsService) SendVerificationCode(name string, sendnotificationchannelverificationcoderequest *SendNotificationChannelVerificationCodeRequest) *ProjectsNotificationChannelsSendVerificationCodeCall { - c := &ProjectsNotificationChannelsSendVerificationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.sendnotificationchannelverificationcoderequest = sendnotificationchannelverificationcoderequest - 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 *ProjectsNotificationChannelsSendVerificationCodeCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsSendVerificationCodeCall { - 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 *ProjectsNotificationChannelsSendVerificationCodeCall) Context(ctx context.Context) *ProjectsNotificationChannelsSendVerificationCodeCall { - 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 *ProjectsNotificationChannelsSendVerificationCodeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsNotificationChannelsSendVerificationCodeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.sendnotificationchannelverificationcoderequest) - 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, "v3/{+name}:sendVerificationCode") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.notificationChannels.sendVerificationCode" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsNotificationChannelsSendVerificationCodeCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Causes a verification code to be delivered to the channel. The code can then be supplied in VerifyNotificationChannel to verify the channel.", - // "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:sendVerificationCode", - // "httpMethod": "POST", - // "id": "monitoring.projects.notificationChannels.sendVerificationCode", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The notification channel to which to send a verification code.", - // "location": "path", - // "pattern": "^projects/[^/]+/notificationChannels/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}:sendVerificationCode", - // "request": { - // "$ref": "SendNotificationChannelVerificationCodeRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.notificationChannels.verify": - -type ProjectsNotificationChannelsVerifyCall struct { - s *Service - name string - verifynotificationchannelrequest *VerifyNotificationChannelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Verify: Verifies a NotificationChannel by proving receipt of the code -// delivered to the channel as a result of calling -// SendNotificationChannelVerificationCode. -func (r *ProjectsNotificationChannelsService) Verify(name string, verifynotificationchannelrequest *VerifyNotificationChannelRequest) *ProjectsNotificationChannelsVerifyCall { - c := &ProjectsNotificationChannelsVerifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.verifynotificationchannelrequest = verifynotificationchannelrequest - 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 *ProjectsNotificationChannelsVerifyCall) Fields(s ...googleapi.Field) *ProjectsNotificationChannelsVerifyCall { - 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 *ProjectsNotificationChannelsVerifyCall) Context(ctx context.Context) *ProjectsNotificationChannelsVerifyCall { - 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 *ProjectsNotificationChannelsVerifyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsNotificationChannelsVerifyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.verifynotificationchannelrequest) - 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, "v3/{+name}:verify") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.notificationChannels.verify" call. -// Exactly one of *NotificationChannel or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *NotificationChannel.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 *ProjectsNotificationChannelsVerifyCall) Do(opts ...googleapi.CallOption) (*NotificationChannel, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &NotificationChannel{ - 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": "Verifies a NotificationChannel by proving receipt of the code delivered to the channel as a result of calling SendNotificationChannelVerificationCode.", - // "flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:verify", - // "httpMethod": "POST", - // "id": "monitoring.projects.notificationChannels.verify", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The notification channel to verify.", - // "location": "path", - // "pattern": "^projects/[^/]+/notificationChannels/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}:verify", - // "request": { - // "$ref": "VerifyNotificationChannelRequest" - // }, - // "response": { - // "$ref": "NotificationChannel" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.timeSeries.create": - -type ProjectsTimeSeriesCreateCall struct { - s *Service - name string - createtimeseriesrequest *CreateTimeSeriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates or adds data to one or more time series. The response -// is empty if all time series in the request were written. If any time -// series could not be written, a corresponding failure message is -// included in the error response. -func (r *ProjectsTimeSeriesService) Create(name string, createtimeseriesrequest *CreateTimeSeriesRequest) *ProjectsTimeSeriesCreateCall { - c := &ProjectsTimeSeriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.createtimeseriesrequest = createtimeseriesrequest - 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 *ProjectsTimeSeriesCreateCall) Fields(s ...googleapi.Field) *ProjectsTimeSeriesCreateCall { - 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 *ProjectsTimeSeriesCreateCall) Context(ctx context.Context) *ProjectsTimeSeriesCreateCall { - 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 *ProjectsTimeSeriesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsTimeSeriesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.createtimeseriesrequest) - 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, "v3/{+name}/timeSeries") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.timeSeries.create" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsTimeSeriesCreateCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.", - // "flatPath": "v3/projects/{projectsId}/timeSeries", - // "httpMethod": "POST", - // "id": "monitoring.projects.timeSeries.create", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}/timeSeries", - // "request": { - // "$ref": "CreateTimeSeriesRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.write" - // ] - // } - -} - -// method id "monitoring.projects.timeSeries.list": - -type ProjectsTimeSeriesListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists time series that match a filter. This method does not -// require a Stackdriver account. -func (r *ProjectsTimeSeriesService) List(name string) *ProjectsTimeSeriesListCall { - c := &ProjectsTimeSeriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// AggregationAlignmentPeriod sets the optional parameter -// "aggregation.alignmentPeriod": The alignment period for per-time -// series alignment. If present, alignmentPeriod must be at least 60 -// seconds. After per-time series alignment, each time series will -// contain data points only on the period boundaries. If -// perSeriesAligner is not specified or equals ALIGN_NONE, then this -// field is ignored. If perSeriesAligner is specified and does not equal -// ALIGN_NONE, then this field must be defined; otherwise an error is -// returned. -func (c *ProjectsTimeSeriesListCall) AggregationAlignmentPeriod(aggregationAlignmentPeriod string) *ProjectsTimeSeriesListCall { - c.urlParams_.Set("aggregation.alignmentPeriod", aggregationAlignmentPeriod) - return c -} - -// AggregationCrossSeriesReducer sets the optional parameter -// "aggregation.crossSeriesReducer": The approach to be used to combine -// time series. Not all reducer functions may be applied to all time -// series, depending on the metric type and the value type of the -// original time series. Reduction may change the metric type of value -// type of the time series.Time series data must be aligned in order to -// perform cross-time series reduction. If crossSeriesReducer is -// specified, then perSeriesAligner must be specified and not equal -// ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error -// is returned. -// -// Possible values: -// "REDUCE_NONE" -// "REDUCE_MEAN" -// "REDUCE_MIN" -// "REDUCE_MAX" -// "REDUCE_SUM" -// "REDUCE_STDDEV" -// "REDUCE_COUNT" -// "REDUCE_COUNT_TRUE" -// "REDUCE_COUNT_FALSE" -// "REDUCE_FRACTION_TRUE" -// "REDUCE_PERCENTILE_99" -// "REDUCE_PERCENTILE_95" -// "REDUCE_PERCENTILE_50" -// "REDUCE_PERCENTILE_05" -func (c *ProjectsTimeSeriesListCall) AggregationCrossSeriesReducer(aggregationCrossSeriesReducer string) *ProjectsTimeSeriesListCall { - c.urlParams_.Set("aggregation.crossSeriesReducer", aggregationCrossSeriesReducer) - return c -} - -// AggregationGroupByFields sets the optional parameter -// "aggregation.groupByFields": The set of fields to preserve when -// crossSeriesReducer is specified. The groupByFields determine how the -// time series are partitioned into subsets prior to applying the -// aggregation function. Each subset contains time series that have the -// same value for each of the grouping fields. Each individual time -// series is a member of exactly one subset. The crossSeriesReducer is -// applied to each subset of time series. It is not possible to reduce -// across different resource types, so this field implicitly contains -// resource.type. Fields not specified in groupByFields are aggregated -// away. If groupByFields is not specified and all the time series have -// the same resource type, then the time series are aggregated into a -// single output time series. If crossSeriesReducer is not defined, this -// field is ignored. -func (c *ProjectsTimeSeriesListCall) AggregationGroupByFields(aggregationGroupByFields ...string) *ProjectsTimeSeriesListCall { - c.urlParams_.SetMulti("aggregation.groupByFields", append([]string{}, aggregationGroupByFields...)) - return c -} - -// AggregationPerSeriesAligner sets the optional parameter -// "aggregation.perSeriesAligner": The approach to be used to align -// individual time series. Not all alignment functions may be applied to -// all time series, depending on the metric type and value type of the -// original time series. Alignment may change the metric type or the -// value type of the time series.Time series data must be aligned in -// order to perform cross-time series reduction. If crossSeriesReducer -// is specified, then perSeriesAligner must be specified and not equal -// ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error -// is returned. -// -// Possible values: -// "ALIGN_NONE" -// "ALIGN_DELTA" -// "ALIGN_RATE" -// "ALIGN_INTERPOLATE" -// "ALIGN_NEXT_OLDER" -// "ALIGN_MIN" -// "ALIGN_MAX" -// "ALIGN_MEAN" -// "ALIGN_COUNT" -// "ALIGN_SUM" -// "ALIGN_STDDEV" -// "ALIGN_COUNT_TRUE" -// "ALIGN_COUNT_FALSE" -// "ALIGN_FRACTION_TRUE" -// "ALIGN_PERCENTILE_99" -// "ALIGN_PERCENTILE_95" -// "ALIGN_PERCENTILE_50" -// "ALIGN_PERCENTILE_05" -// "ALIGN_PERCENT_CHANGE" -func (c *ProjectsTimeSeriesListCall) AggregationPerSeriesAligner(aggregationPerSeriesAligner string) *ProjectsTimeSeriesListCall { - c.urlParams_.Set("aggregation.perSeriesAligner", aggregationPerSeriesAligner) - return c -} - -// Filter sets the optional parameter "filter": A monitoring filter that -// specifies which time series should be returned. The filter must -// specify a single metric type, and can additionally specify metric -// labels and other information. For example: -// metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND -// metric.label.instance_name = "my-instance-name" -func (c *ProjectsTimeSeriesListCall) Filter(filter string) *ProjectsTimeSeriesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IntervalEndTime sets the optional parameter "interval.endTime": -// Required. The end of the time interval. -func (c *ProjectsTimeSeriesListCall) IntervalEndTime(intervalEndTime string) *ProjectsTimeSeriesListCall { - c.urlParams_.Set("interval.endTime", intervalEndTime) - return c -} - -// IntervalStartTime sets the optional parameter "interval.startTime": -// The beginning of the time interval. The default value for the start -// time is the end time. The start time must not be later than the end -// time. -func (c *ProjectsTimeSeriesListCall) IntervalStartTime(intervalStartTime string) *ProjectsTimeSeriesListCall { - c.urlParams_.Set("interval.startTime", intervalStartTime) - return c -} - -// OrderBy sets the optional parameter "orderBy": Unsupported: must be -// left blank. The points in each time series are returned in reverse -// time order. -func (c *ProjectsTimeSeriesListCall) OrderBy(orderBy string) *ProjectsTimeSeriesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": A positive number -// that is the maximum number of results to return. If page_size is -// empty or more than 100,000 results, the effective page_size is -// 100,000 results. If view is set to FULL, this is the maximum number -// of Points returned. If view is set to HEADERS, this is the maximum -// number of TimeSeries returned. -func (c *ProjectsTimeSeriesListCall) PageSize(pageSize int64) *ProjectsTimeSeriesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If this field is -// not empty then it must contain the nextPageToken value returned by a -// previous call to this method. Using this field causes the method to -// return additional results from the previous method call. -func (c *ProjectsTimeSeriesListCall) PageToken(pageToken string) *ProjectsTimeSeriesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// View sets the optional parameter "view": Specifies which information -// is returned about the time series. -// -// Possible values: -// "FULL" -// "HEADERS" -func (c *ProjectsTimeSeriesListCall) View(view string) *ProjectsTimeSeriesListCall { - c.urlParams_.Set("view", view) - 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 *ProjectsTimeSeriesListCall) Fields(s ...googleapi.Field) *ProjectsTimeSeriesListCall { - 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 *ProjectsTimeSeriesListCall) IfNoneMatch(entityTag string) *ProjectsTimeSeriesListCall { - 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 *ProjectsTimeSeriesListCall) Context(ctx context.Context) *ProjectsTimeSeriesListCall { - 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 *ProjectsTimeSeriesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsTimeSeriesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/timeSeries") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.timeSeries.list" call. -// Exactly one of *ListTimeSeriesResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListTimeSeriesResponse.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 *ProjectsTimeSeriesListCall) Do(opts ...googleapi.CallOption) (*ListTimeSeriesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListTimeSeriesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists time series that match a filter. This method does not require a Stackdriver account.", - // "flatPath": "v3/projects/{projectsId}/timeSeries", - // "httpMethod": "GET", - // "id": "monitoring.projects.timeSeries.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "aggregation.alignmentPeriod": { - // "description": "The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned.", - // "format": "google-duration", - // "location": "query", - // "type": "string" - // }, - // "aggregation.crossSeriesReducer": { - // "description": "The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.", - // "enum": [ - // "REDUCE_NONE", - // "REDUCE_MEAN", - // "REDUCE_MIN", - // "REDUCE_MAX", - // "REDUCE_SUM", - // "REDUCE_STDDEV", - // "REDUCE_COUNT", - // "REDUCE_COUNT_TRUE", - // "REDUCE_COUNT_FALSE", - // "REDUCE_FRACTION_TRUE", - // "REDUCE_PERCENTILE_99", - // "REDUCE_PERCENTILE_95", - // "REDUCE_PERCENTILE_50", - // "REDUCE_PERCENTILE_05" - // ], - // "location": "query", - // "type": "string" - // }, - // "aggregation.groupByFields": { - // "description": "The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored.", - // "location": "query", - // "repeated": true, - // "type": "string" - // }, - // "aggregation.perSeriesAligner": { - // "description": "The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.", - // "enum": [ - // "ALIGN_NONE", - // "ALIGN_DELTA", - // "ALIGN_RATE", - // "ALIGN_INTERPOLATE", - // "ALIGN_NEXT_OLDER", - // "ALIGN_MIN", - // "ALIGN_MAX", - // "ALIGN_MEAN", - // "ALIGN_COUNT", - // "ALIGN_SUM", - // "ALIGN_STDDEV", - // "ALIGN_COUNT_TRUE", - // "ALIGN_COUNT_FALSE", - // "ALIGN_FRACTION_TRUE", - // "ALIGN_PERCENTILE_99", - // "ALIGN_PERCENTILE_95", - // "ALIGN_PERCENTILE_50", - // "ALIGN_PERCENTILE_05", - // "ALIGN_PERCENT_CHANGE" - // ], - // "location": "query", - // "type": "string" - // }, - // "filter": { - // "description": "A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example:\nmetric.type = \"compute.googleapis.com/instance/cpu/usage_time\" AND\n metric.label.instance_name = \"my-instance-name\"\n", - // "location": "query", - // "type": "string" - // }, - // "interval.endTime": { - // "description": "Required. The end of the time interval.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "interval.startTime": { - // "description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "orderBy": { - // "description": "Unsupported: must be left blank. The points in each time series are returned in reverse time order.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "A positive number that is the maximum number of results to return. If page_size is empty or more than 100,000 results, the effective page_size is 100,000 results. If view is set to FULL, this is the maximum number of Points returned. If view is set to HEADERS, this is the maximum number of TimeSeries returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - // "location": "query", - // "type": "string" - // }, - // "view": { - // "description": "Specifies which information is returned about the time series.", - // "enum": [ - // "FULL", - // "HEADERS" - // ], - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/{+name}/timeSeries", - // "response": { - // "$ref": "ListTimeSeriesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsTimeSeriesListCall) Pages(ctx context.Context, f func(*ListTimeSeriesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "monitoring.projects.uptimeCheckConfigs.create": - -type ProjectsUptimeCheckConfigsCreateCall struct { - s *Service - parent string - uptimecheckconfig *UptimeCheckConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new uptime check configuration. -func (r *ProjectsUptimeCheckConfigsService) Create(parent string, uptimecheckconfig *UptimeCheckConfig) *ProjectsUptimeCheckConfigsCreateCall { - c := &ProjectsUptimeCheckConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.uptimecheckconfig = uptimecheckconfig - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsUptimeCheckConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsUptimeCheckConfigsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsUptimeCheckConfigsCreateCall) Context(ctx context.Context) *ProjectsUptimeCheckConfigsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsUptimeCheckConfigsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsUptimeCheckConfigsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.uptimecheckconfig) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+parent}/uptimeCheckConfigs") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.uptimeCheckConfigs.create" call. -// Exactly one of *UptimeCheckConfig or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *UptimeCheckConfig.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsUptimeCheckConfigsCreateCall) Do(opts ...googleapi.CallOption) (*UptimeCheckConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &UptimeCheckConfig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new uptime check configuration.", - // "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs", - // "httpMethod": "POST", - // "id": "monitoring.projects.uptimeCheckConfigs.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "The project in which to create the uptime check. The format is projects/[PROJECT_ID].", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+parent}/uptimeCheckConfigs", - // "request": { - // "$ref": "UptimeCheckConfig" - // }, - // "response": { - // "$ref": "UptimeCheckConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.uptimeCheckConfigs.delete": - -type ProjectsUptimeCheckConfigsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes an uptime check configuration. Note that this method -// will fail if the uptime check configuration is referenced by an alert -// policy or other dependent configs that would be rendered invalid by -// the deletion. -func (r *ProjectsUptimeCheckConfigsService) Delete(name string) *ProjectsUptimeCheckConfigsDeleteCall { - c := &ProjectsUptimeCheckConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsUptimeCheckConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsUptimeCheckConfigsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsUptimeCheckConfigsDeleteCall) Context(ctx context.Context) *ProjectsUptimeCheckConfigsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsUptimeCheckConfigsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsUptimeCheckConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.uptimeCheckConfigs.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsUptimeCheckConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes an uptime check configuration. Note that this method will fail if the uptime check configuration is referenced by an alert policy or other dependent configs that would be rendered invalid by the deletion.", - // "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs/{uptimeCheckConfigsId}", - // "httpMethod": "DELETE", - // "id": "monitoring.projects.uptimeCheckConfigs.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The uptime check configuration to delete. The format is projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].", - // "location": "path", - // "pattern": "^projects/[^/]+/uptimeCheckConfigs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.projects.uptimeCheckConfigs.get": - -type ProjectsUptimeCheckConfigsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a single uptime check configuration. -func (r *ProjectsUptimeCheckConfigsService) Get(name string) *ProjectsUptimeCheckConfigsGetCall { - c := &ProjectsUptimeCheckConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsUptimeCheckConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsUptimeCheckConfigsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsUptimeCheckConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsUptimeCheckConfigsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsUptimeCheckConfigsGetCall) Context(ctx context.Context) *ProjectsUptimeCheckConfigsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsUptimeCheckConfigsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsUptimeCheckConfigsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.uptimeCheckConfigs.get" call. -// Exactly one of *UptimeCheckConfig or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *UptimeCheckConfig.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsUptimeCheckConfigsGetCall) Do(opts ...googleapi.CallOption) (*UptimeCheckConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &UptimeCheckConfig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets a single uptime check configuration.", - // "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs/{uptimeCheckConfigsId}", - // "httpMethod": "GET", - // "id": "monitoring.projects.uptimeCheckConfigs.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The uptime check configuration to retrieve. The format is projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].", - // "location": "path", - // "pattern": "^projects/[^/]+/uptimeCheckConfigs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "response": { - // "$ref": "UptimeCheckConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read" - // ] - // } - -} - -// method id "monitoring.projects.uptimeCheckConfigs.list": - -type ProjectsUptimeCheckConfigsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the existing valid uptime check configurations for the -// project, leaving out any invalid configurations. -func (r *ProjectsUptimeCheckConfigsService) List(parent string) *ProjectsUptimeCheckConfigsListCall { - c := &ProjectsUptimeCheckConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. The server may further -// constrain the maximum number of results returned in a single page. If -// the page_size is <=0, the server will decide the number of results to -// be returned. -func (c *ProjectsUptimeCheckConfigsListCall) PageSize(pageSize int64) *ProjectsUptimeCheckConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If this field is -// not empty then it must contain the nextPageToken value returned by a -// previous call to this method. Using this field causes the method to -// return more results from the previous method call. -func (c *ProjectsUptimeCheckConfigsListCall) PageToken(pageToken string) *ProjectsUptimeCheckConfigsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsUptimeCheckConfigsListCall) Fields(s ...googleapi.Field) *ProjectsUptimeCheckConfigsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsUptimeCheckConfigsListCall) IfNoneMatch(entityTag string) *ProjectsUptimeCheckConfigsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsUptimeCheckConfigsListCall) Context(ctx context.Context) *ProjectsUptimeCheckConfigsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsUptimeCheckConfigsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsUptimeCheckConfigsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+parent}/uptimeCheckConfigs") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.uptimeCheckConfigs.list" call. -// Exactly one of *ListUptimeCheckConfigsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListUptimeCheckConfigsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsUptimeCheckConfigsListCall) Do(opts ...googleapi.CallOption) (*ListUptimeCheckConfigsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListUptimeCheckConfigsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the existing valid uptime check configurations for the project, leaving out any invalid configurations.", - // "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs", - // "httpMethod": "GET", - // "id": "monitoring.projects.uptimeCheckConfigs.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "pageSize": { - // "description": "The maximum number of results to return in a single response. The server may further constrain the maximum number of results returned in a single page. If the page_size is \u003c=0, the server will decide the number of results to be returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "The project whose uptime check configurations are listed. The format is projects/[PROJECT_ID].", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+parent}/uptimeCheckConfigs", - // "response": { - // "$ref": "ListUptimeCheckConfigsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsUptimeCheckConfigsListCall) Pages(ctx context.Context, f func(*ListUptimeCheckConfigsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "monitoring.projects.uptimeCheckConfigs.patch": - -type ProjectsUptimeCheckConfigsPatchCall struct { - s *Service - name string - uptimecheckconfig *UptimeCheckConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an uptime check configuration. You can either replace -// the entire configuration with a new one or replace only certain -// fields in the current configuration by specifying the fields to be -// updated via "updateMask". Returns the updated configuration. -func (r *ProjectsUptimeCheckConfigsService) Patch(name string, uptimecheckconfig *UptimeCheckConfig) *ProjectsUptimeCheckConfigsPatchCall { - c := &ProjectsUptimeCheckConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.uptimecheckconfig = uptimecheckconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": If present, only -// the listed fields in the current uptime check configuration are -// updated with values from the new configuration. If this field is -// empty, then the current configuration is completely replaced with the -// new configuration. -func (c *ProjectsUptimeCheckConfigsPatchCall) UpdateMask(updateMask string) *ProjectsUptimeCheckConfigsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsUptimeCheckConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsUptimeCheckConfigsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsUptimeCheckConfigsPatchCall) Context(ctx context.Context) *ProjectsUptimeCheckConfigsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsUptimeCheckConfigsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsUptimeCheckConfigsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.uptimecheckconfig) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.projects.uptimeCheckConfigs.patch" call. -// Exactly one of *UptimeCheckConfig or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *UptimeCheckConfig.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsUptimeCheckConfigsPatchCall) Do(opts ...googleapi.CallOption) (*UptimeCheckConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &UptimeCheckConfig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an uptime check configuration. You can either replace the entire configuration with a new one or replace only certain fields in the current configuration by specifying the fields to be updated via \"updateMask\". Returns the updated configuration.", - // "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs/{uptimeCheckConfigsId}", - // "httpMethod": "PATCH", - // "id": "monitoring.projects.uptimeCheckConfigs.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "A unique resource name for this UptimeCheckConfig. The format is:projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].This field should be omitted when creating the uptime check configuration; on create, the resource name is assigned by the server and included in the response.", - // "location": "path", - // "pattern": "^projects/[^/]+/uptimeCheckConfigs/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Optional. If present, only the listed fields in the current uptime check configuration are updated with values from the new configuration. If this field is empty, then the current configuration is completely replaced with the new configuration.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/{+name}", - // "request": { - // "$ref": "UptimeCheckConfig" - // }, - // "response": { - // "$ref": "UptimeCheckConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring" - // ] - // } - -} - -// method id "monitoring.timeSeries.create": - -type TimeSeriesCreateCall struct { - s *Service - name string - createtimeseriesrequest *CreateTimeSeriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates or adds data to one or more time series. The response -// is empty if all time series in the request were written. If any time -// series could not be written, a corresponding failure message is -// included in the error response. -func (r *TimeSeriesService) Create(name string, createtimeseriesrequest *CreateTimeSeriesRequest) *TimeSeriesCreateCall { - c := &TimeSeriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.createtimeseriesrequest = createtimeseriesrequest - 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 *TimeSeriesCreateCall) Fields(s ...googleapi.Field) *TimeSeriesCreateCall { - 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 *TimeSeriesCreateCall) Context(ctx context.Context) *TimeSeriesCreateCall { - 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 *TimeSeriesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TimeSeriesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.createtimeseriesrequest) - 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, "v3/{+name}/timeSeries") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.timeSeries.create" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *TimeSeriesCreateCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response.", - // "flatPath": "v3/{v3Id}/{v3Id1}/timeSeries", - // "httpMethod": "POST", - // "id": "monitoring.timeSeries.create", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - // "location": "path", - // "pattern": "^[^/]+/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v3/{+name}/timeSeries", - // "request": { - // "$ref": "CreateTimeSeriesRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.write" - // ] - // } - -} - -// method id "monitoring.timeSeries.list": - -type TimeSeriesListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists time series that match a filter. This method does not -// require a Stackdriver account. -func (r *TimeSeriesService) List(name string) *TimeSeriesListCall { - c := &TimeSeriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// AggregationAlignmentPeriod sets the optional parameter -// "aggregation.alignmentPeriod": The alignment period for per-time -// series alignment. If present, alignmentPeriod must be at least 60 -// seconds. After per-time series alignment, each time series will -// contain data points only on the period boundaries. If -// perSeriesAligner is not specified or equals ALIGN_NONE, then this -// field is ignored. If perSeriesAligner is specified and does not equal -// ALIGN_NONE, then this field must be defined; otherwise an error is -// returned. -func (c *TimeSeriesListCall) AggregationAlignmentPeriod(aggregationAlignmentPeriod string) *TimeSeriesListCall { - c.urlParams_.Set("aggregation.alignmentPeriod", aggregationAlignmentPeriod) - return c -} - -// AggregationCrossSeriesReducer sets the optional parameter -// "aggregation.crossSeriesReducer": The approach to be used to combine -// time series. Not all reducer functions may be applied to all time -// series, depending on the metric type and the value type of the -// original time series. Reduction may change the metric type of value -// type of the time series.Time series data must be aligned in order to -// perform cross-time series reduction. If crossSeriesReducer is -// specified, then perSeriesAligner must be specified and not equal -// ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error -// is returned. -// -// Possible values: -// "REDUCE_NONE" -// "REDUCE_MEAN" -// "REDUCE_MIN" -// "REDUCE_MAX" -// "REDUCE_SUM" -// "REDUCE_STDDEV" -// "REDUCE_COUNT" -// "REDUCE_COUNT_TRUE" -// "REDUCE_COUNT_FALSE" -// "REDUCE_FRACTION_TRUE" -// "REDUCE_PERCENTILE_99" -// "REDUCE_PERCENTILE_95" -// "REDUCE_PERCENTILE_50" -// "REDUCE_PERCENTILE_05" -func (c *TimeSeriesListCall) AggregationCrossSeriesReducer(aggregationCrossSeriesReducer string) *TimeSeriesListCall { - c.urlParams_.Set("aggregation.crossSeriesReducer", aggregationCrossSeriesReducer) - return c -} - -// AggregationGroupByFields sets the optional parameter -// "aggregation.groupByFields": The set of fields to preserve when -// crossSeriesReducer is specified. The groupByFields determine how the -// time series are partitioned into subsets prior to applying the -// aggregation function. Each subset contains time series that have the -// same value for each of the grouping fields. Each individual time -// series is a member of exactly one subset. The crossSeriesReducer is -// applied to each subset of time series. It is not possible to reduce -// across different resource types, so this field implicitly contains -// resource.type. Fields not specified in groupByFields are aggregated -// away. If groupByFields is not specified and all the time series have -// the same resource type, then the time series are aggregated into a -// single output time series. If crossSeriesReducer is not defined, this -// field is ignored. -func (c *TimeSeriesListCall) AggregationGroupByFields(aggregationGroupByFields ...string) *TimeSeriesListCall { - c.urlParams_.SetMulti("aggregation.groupByFields", append([]string{}, aggregationGroupByFields...)) - return c -} - -// AggregationPerSeriesAligner sets the optional parameter -// "aggregation.perSeriesAligner": The approach to be used to align -// individual time series. Not all alignment functions may be applied to -// all time series, depending on the metric type and value type of the -// original time series. Alignment may change the metric type or the -// value type of the time series.Time series data must be aligned in -// order to perform cross-time series reduction. If crossSeriesReducer -// is specified, then perSeriesAligner must be specified and not equal -// ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error -// is returned. -// -// Possible values: -// "ALIGN_NONE" -// "ALIGN_DELTA" -// "ALIGN_RATE" -// "ALIGN_INTERPOLATE" -// "ALIGN_NEXT_OLDER" -// "ALIGN_MIN" -// "ALIGN_MAX" -// "ALIGN_MEAN" -// "ALIGN_COUNT" -// "ALIGN_SUM" -// "ALIGN_STDDEV" -// "ALIGN_COUNT_TRUE" -// "ALIGN_COUNT_FALSE" -// "ALIGN_FRACTION_TRUE" -// "ALIGN_PERCENTILE_99" -// "ALIGN_PERCENTILE_95" -// "ALIGN_PERCENTILE_50" -// "ALIGN_PERCENTILE_05" -// "ALIGN_PERCENT_CHANGE" -func (c *TimeSeriesListCall) AggregationPerSeriesAligner(aggregationPerSeriesAligner string) *TimeSeriesListCall { - c.urlParams_.Set("aggregation.perSeriesAligner", aggregationPerSeriesAligner) - return c -} - -// Filter sets the optional parameter "filter": A monitoring filter that -// specifies which time series should be returned. The filter must -// specify a single metric type, and can additionally specify metric -// labels and other information. For example: -// metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND -// metric.label.instance_name = "my-instance-name" -func (c *TimeSeriesListCall) Filter(filter string) *TimeSeriesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IntervalEndTime sets the optional parameter "interval.endTime": -// Required. The end of the time interval. -func (c *TimeSeriesListCall) IntervalEndTime(intervalEndTime string) *TimeSeriesListCall { - c.urlParams_.Set("interval.endTime", intervalEndTime) - return c -} - -// IntervalStartTime sets the optional parameter "interval.startTime": -// The beginning of the time interval. The default value for the start -// time is the end time. The start time must not be later than the end -// time. -func (c *TimeSeriesListCall) IntervalStartTime(intervalStartTime string) *TimeSeriesListCall { - c.urlParams_.Set("interval.startTime", intervalStartTime) - return c -} - -// OrderBy sets the optional parameter "orderBy": Unsupported: must be -// left blank. The points in each time series are returned in reverse -// time order. -func (c *TimeSeriesListCall) OrderBy(orderBy string) *TimeSeriesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": A positive number -// that is the maximum number of results to return. If page_size is -// empty or more than 100,000 results, the effective page_size is -// 100,000 results. If view is set to FULL, this is the maximum number -// of Points returned. If view is set to HEADERS, this is the maximum -// number of TimeSeries returned. -func (c *TimeSeriesListCall) PageSize(pageSize int64) *TimeSeriesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If this field is -// not empty then it must contain the nextPageToken value returned by a -// previous call to this method. Using this field causes the method to -// return additional results from the previous method call. -func (c *TimeSeriesListCall) PageToken(pageToken string) *TimeSeriesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// View sets the optional parameter "view": Specifies which information -// is returned about the time series. -// -// Possible values: -// "FULL" -// "HEADERS" -func (c *TimeSeriesListCall) View(view string) *TimeSeriesListCall { - c.urlParams_.Set("view", view) - 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 *TimeSeriesListCall) Fields(s ...googleapi.Field) *TimeSeriesListCall { - 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 *TimeSeriesListCall) IfNoneMatch(entityTag string) *TimeSeriesListCall { - 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 *TimeSeriesListCall) Context(ctx context.Context) *TimeSeriesListCall { - 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 *TimeSeriesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TimeSeriesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}/timeSeries") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.timeSeries.list" call. -// Exactly one of *ListTimeSeriesResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListTimeSeriesResponse.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 *TimeSeriesListCall) Do(opts ...googleapi.CallOption) (*ListTimeSeriesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListTimeSeriesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists time series that match a filter. This method does not require a Stackdriver account.", - // "flatPath": "v3/{v3Id}/{v3Id1}/timeSeries", - // "httpMethod": "GET", - // "id": "monitoring.timeSeries.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "aggregation.alignmentPeriod": { - // "description": "The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned.", - // "format": "google-duration", - // "location": "query", - // "type": "string" - // }, - // "aggregation.crossSeriesReducer": { - // "description": "The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.", - // "enum": [ - // "REDUCE_NONE", - // "REDUCE_MEAN", - // "REDUCE_MIN", - // "REDUCE_MAX", - // "REDUCE_SUM", - // "REDUCE_STDDEV", - // "REDUCE_COUNT", - // "REDUCE_COUNT_TRUE", - // "REDUCE_COUNT_FALSE", - // "REDUCE_FRACTION_TRUE", - // "REDUCE_PERCENTILE_99", - // "REDUCE_PERCENTILE_95", - // "REDUCE_PERCENTILE_50", - // "REDUCE_PERCENTILE_05" - // ], - // "location": "query", - // "type": "string" - // }, - // "aggregation.groupByFields": { - // "description": "The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored.", - // "location": "query", - // "repeated": true, - // "type": "string" - // }, - // "aggregation.perSeriesAligner": { - // "description": "The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.", - // "enum": [ - // "ALIGN_NONE", - // "ALIGN_DELTA", - // "ALIGN_RATE", - // "ALIGN_INTERPOLATE", - // "ALIGN_NEXT_OLDER", - // "ALIGN_MIN", - // "ALIGN_MAX", - // "ALIGN_MEAN", - // "ALIGN_COUNT", - // "ALIGN_SUM", - // "ALIGN_STDDEV", - // "ALIGN_COUNT_TRUE", - // "ALIGN_COUNT_FALSE", - // "ALIGN_FRACTION_TRUE", - // "ALIGN_PERCENTILE_99", - // "ALIGN_PERCENTILE_95", - // "ALIGN_PERCENTILE_50", - // "ALIGN_PERCENTILE_05", - // "ALIGN_PERCENT_CHANGE" - // ], - // "location": "query", - // "type": "string" - // }, - // "filter": { - // "description": "A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example:\nmetric.type = \"compute.googleapis.com/instance/cpu/usage_time\" AND\n metric.label.instance_name = \"my-instance-name\"\n", - // "location": "query", - // "type": "string" - // }, - // "interval.endTime": { - // "description": "Required. The end of the time interval.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "interval.startTime": { - // "description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The project on which to execute the request. The format is \"projects/{project_id_or_number}\".", - // "location": "path", - // "pattern": "^[^/]+/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "orderBy": { - // "description": "Unsupported: must be left blank. The points in each time series are returned in reverse time order.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "A positive number that is the maximum number of results to return. If page_size is empty or more than 100,000 results, the effective page_size is 100,000 results. If view is set to FULL, this is the maximum number of Points returned. If view is set to HEADERS, this is the maximum number of TimeSeries returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", - // "location": "query", - // "type": "string" - // }, - // "view": { - // "description": "Specifies which information is returned about the time series.", - // "enum": [ - // "FULL", - // "HEADERS" - // ], - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/{+name}/timeSeries", - // "response": { - // "$ref": "ListTimeSeriesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TimeSeriesListCall) Pages(ctx context.Context, f func(*ListTimeSeriesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "monitoring.uptimeCheckIps.list": - -type UptimeCheckIpsListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Returns the list of IPs that checkers run from -func (r *UptimeCheckIpsService) List() *UptimeCheckIpsListCall { - c := &UptimeCheckIpsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return in a single response. The server may further -// constrain the maximum number of results returned in a single page. If -// the page_size is <=0, the server will decide the number of results to -// be returned. NOTE: this field is not yet implemented -func (c *UptimeCheckIpsListCall) PageSize(pageSize int64) *UptimeCheckIpsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If this field is -// not empty then it must contain the nextPageToken value returned by a -// previous call to this method. Using this field causes the method to -// return more results from the previous method call. NOTE: this field -// is not yet implemented -func (c *UptimeCheckIpsListCall) PageToken(pageToken string) *UptimeCheckIpsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UptimeCheckIpsListCall) Fields(s ...googleapi.Field) *UptimeCheckIpsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *UptimeCheckIpsListCall) IfNoneMatch(entityTag string) *UptimeCheckIpsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UptimeCheckIpsListCall) Context(ctx context.Context) *UptimeCheckIpsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UptimeCheckIpsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UptimeCheckIpsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/uptimeCheckIps") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "monitoring.uptimeCheckIps.list" call. -// Exactly one of *ListUptimeCheckIpsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListUptimeCheckIpsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *UptimeCheckIpsListCall) Do(opts ...googleapi.CallOption) (*ListUptimeCheckIpsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListUptimeCheckIpsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the list of IPs that checkers run from", - // "flatPath": "v3/uptimeCheckIps", - // "httpMethod": "GET", - // "id": "monitoring.uptimeCheckIps.list", - // "parameterOrder": [], - // "parameters": { - // "pageSize": { - // "description": "The maximum number of results to return in a single response. The server may further constrain the maximum number of results returned in a single page. If the page_size is \u003c=0, the server will decide the number of results to be returned. NOTE: this field is not yet implemented", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call. NOTE: this field is not yet implemented", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v3/uptimeCheckIps", - // "response": { - // "$ref": "ListUptimeCheckIpsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/monitoring", - // "https://www.googleapis.com/auth/monitoring.read" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *UptimeCheckIpsListCall) Pages(ctx context.Context, f func(*ListUptimeCheckIpsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} diff --git a/vendor/google.golang.org/api/option/credentials_go19.go b/vendor/google.golang.org/api/option/credentials_go19.go index 30c889a1..c08c1149 100644 --- a/vendor/google.golang.org/api/option/credentials_go19.go +++ b/vendor/google.golang.org/api/option/credentials_go19.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/google.golang.org/api/option/credentials_notgo19.go b/vendor/google.golang.org/api/option/credentials_notgo19.go index 74d3a4b5..90d22900 100644 --- a/vendor/google.golang.org/api/option/credentials_notgo19.go +++ b/vendor/google.golang.org/api/option/credentials_notgo19.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/google.golang.org/api/option/option.go b/vendor/google.golang.org/api/option/option.go index e7ecfe3c..c1499f94 100644 --- a/vendor/google.golang.org/api/option/option.go +++ b/vendor/google.golang.org/api/option/option.go @@ -1,4 +1,4 @@ -// Copyright 2017 Google LLC +// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -61,20 +61,6 @@ func WithServiceAccountFile(filename string) ClientOption { return WithCredentialsFile(filename) } -// WithCredentialsJSON returns a ClientOption that authenticates -// API calls with the given service account or refresh token JSON -// credentials. -func WithCredentialsJSON(p []byte) ClientOption { - return withCredentialsJSON(p) -} - -type withCredentialsJSON []byte - -func (w withCredentialsJSON) Apply(o *internal.DialSettings) { - o.CredentialsJSON = make([]byte, len(w)) - copy(o.CredentialsJSON, w) -} - // WithEndpoint returns a ClientOption that overrides the default endpoint // to be used for a service. func WithEndpoint(url string) ClientOption { @@ -96,8 +82,9 @@ func WithScopes(scope ...string) ClientOption { type withScopes []string func (w withScopes) Apply(o *internal.DialSettings) { - o.Scopes = make([]string, len(w)) - copy(o.Scopes, w) + s := make([]string, len(w)) + copy(s, w) + o.Scopes = s } // WithUserAgent returns a ClientOption that sets the User-Agent. diff --git a/vendor/google.golang.org/api/pubsub/v1/pubsub-api.json b/vendor/google.golang.org/api/pubsub/v1/pubsub-api.json index a82ca9ad..8dc3106c 100644 --- a/vendor/google.golang.org/api/pubsub/v1/pubsub-api.json +++ b/vendor/google.golang.org/api/pubsub/v1/pubsub-api.json @@ -111,7 +111,7 @@ "snapshots": { "methods": { "create": { - "description": "Creates a snapshot from the requested subscription. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\n\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\u003cbr\u003e\u003cbr\u003e\nIf the snapshot already exists, returns `ALREADY_EXISTS`.\nIf the requested subscription doesn't exist, returns `NOT_FOUND`.\nIf the backlog in the subscription is too old -- and the resulting snapshot\nwould expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.\nSee also the `Snapshot.expire_time` field. If the name is not provided in\nthe request, the server will assign a random\nname for this snapshot on the same project as the subscription, conforming\nto the [resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated\nname is populated in the returned Snapshot object. Note that for REST API\nrequests, you must specify a name in the request.", + "description": "Creates a snapshot from the requested subscription.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nIf the snapshot already exists, returns `ALREADY_EXISTS`.\nIf the requested subscription doesn't exist, returns `NOT_FOUND`.\nIf the backlog in the subscription is too old -- and the resulting snapshot\nwould expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.\nSee also the `Snapshot.expire_time` field. If the name is not provided in\nthe request, the server will assign a random\nname for this snapshot on the same project as the subscription, conforming\nto the [resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated\nname is populated in the returned Snapshot object. Note that for REST API\nrequests, you must specify a name in the request.", "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", "httpMethod": "PUT", "id": "pubsub.projects.snapshots.create", @@ -120,7 +120,7 @@ ], "parameters": { "name": { - "description": "Optional user-provided name for this snapshot.\nIf the name is not provided in the request, the server will assign a random\nname for this snapshot on the same project as the subscription.\nNote that for REST API requests, you must specify a name. See the\n\u003ca href=\"/pubsub/docs/admin#resource_names\"\u003eresource name rules\u003c/a\u003e.\nFormat is `projects/{project}/snapshots/{snap}`.", + "description": "Optional user-provided name for this snapshot.\nIf the name is not provided in the request, the server will assign a random\nname for this snapshot on the same project as the subscription.\nNote that for REST API requests, you must specify a name.\nFormat is `projects/{project}/snapshots/{snap}`.", "location": "path", "pattern": "^projects/[^/]+/snapshots/[^/]+$", "required": true, @@ -140,7 +140,7 @@ ] }, "delete": { - "description": "Removes an existing snapshot. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nWhen the snapshot is deleted, all messages retained in the snapshot\nare immediately dropped. After a snapshot is deleted, a new one may be\ncreated with the same name, but the new one has no association with the old\nsnapshot or its subscription, unless the same subscription is specified.", + "description": "Removes an existing snapshot. \u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nWhen the snapshot is deleted, all messages retained in the snapshot\nare immediately dropped. After a snapshot is deleted, a new one may be\ncreated with the same name, but the new one has no association with the old\nsnapshot or its subscription, unless the same subscription is specified.", "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", "httpMethod": "DELETE", "id": "pubsub.projects.snapshots.delete", @@ -166,7 +166,7 @@ ] }, "get": { - "description": "Gets the configuration details of a snapshot. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Gets the configuration details of a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", "httpMethod": "GET", "id": "pubsub.projects.snapshots.get", @@ -218,7 +218,7 @@ ] }, "list": { - "description": "Lists the existing snapshots. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Lists the existing snapshots.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", "flatPath": "v1/projects/{projectsId}/snapshots", "httpMethod": "GET", "id": "pubsub.projects.snapshots.list", @@ -255,7 +255,7 @@ ] }, "patch": { - "description": "Updates an existing snapshot. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nNote that certain properties of a snapshot are not modifiable.", + "description": "Updates an existing snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nNote that certain properties of a snapshot are not modifiable.", "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", "httpMethod": "PATCH", "id": "pubsub.projects.snapshots.patch", @@ -635,7 +635,7 @@ ] }, "seek": { - "description": "Seeks an existing subscription to a point in time or to a given snapshot,\nwhichever is provided in the request. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot. Note that both the subscription and the snapshot\nmust be on the same topic.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Seeks an existing subscription to a point in time or to a given snapshot,\nwhichever is provided in the request.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:seek", "httpMethod": "POST", "id": "pubsub.projects.subscriptions.seek", @@ -990,7 +990,7 @@ "snapshots": { "methods": { "list": { - "description": "Lists the names of the snapshots on this topic. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Lists the names of the snapshots on this topic.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", "flatPath": "v1/projects/{projectsId}/topics/{topicsId}/snapshots", "httpMethod": "GET", "id": "pubsub.projects.topics.snapshots.list", @@ -1074,7 +1074,7 @@ } } }, - "revision": "20180828", + "revision": "20180806", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { @@ -1114,7 +1114,7 @@ "type": "object" }, "CreateSnapshotRequest": { - "description": "Request for the `CreateSnapshot` method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be changed in\nbackward-incompatible ways and is not recommended for production use.\nIt is not subject to any SLA or deprecation policy.", + "description": "Request for the `CreateSnapshot` method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be changed in\nbackward-incompatible ways and is not recommended for production use.\nIt is not subject to any SLA or deprecation policy.", "id": "CreateSnapshotRequest", "properties": { "labels": { @@ -1161,7 +1161,7 @@ "type": "object" }, "ListSnapshotsResponse": { - "description": "Response for the `ListSnapshots` method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Response for the `ListSnapshots` method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", "id": "ListSnapshotsResponse", "properties": { "nextPageToken": { @@ -1197,7 +1197,7 @@ "type": "object" }, "ListTopicSnapshotsResponse": { - "description": "Response for the `ListTopicSnapshots` method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Response for the `ListTopicSnapshots` method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", "id": "ListTopicSnapshotsResponse", "properties": { "nextPageToken": { @@ -1424,7 +1424,7 @@ "type": "object" }, "SeekRequest": { - "description": "Request for the `Seek` method. \u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Request for the `Seek` method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", "id": "SeekRequest", "properties": { "snapshot": { @@ -1440,7 +1440,6 @@ "type": "object" }, "SeekResponse": { - "description": "Response for the `Seek` method (this response is empty).", "id": "SeekResponse", "properties": {}, "type": "object" @@ -1457,7 +1456,7 @@ "type": "object" }, "Snapshot": { - "description": "A snapshot resource. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "A snapshot resource.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", "id": "Snapshot", "properties": { "expireTime": { @@ -1500,7 +1499,7 @@ "type": "object" }, "messageRetentionDuration": { - "description": "How long to retain unacknowledged messages in the subscription's backlog,\nfrom the moment a message is published.\nIf `retain_acked_messages` is true, then this also configures the retention\nof acknowledged messages, and thus configures how far back in time a `Seek`\ncan be done. Defaults to 7 days. Cannot be more than 7 days or less than 10\nminutes.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "How long to retain unacknowledged messages in the subscription's backlog,\nfrom the moment a message is published.\nIf `retain_acked_messages` is true, then this also configures the retention\nof acknowledged messages, and thus configures how far back in time a `Seek`\ncan be done. Defaults to 7 days. Cannot be more than 7 days or less than 10\nminutes.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", "format": "google-duration", "type": "string" }, @@ -1513,7 +1512,7 @@ "description": "If push delivery is used with this subscription, this field is\nused to configure it. An empty `pushConfig` signifies that the subscriber\nwill pull and ack messages using API methods." }, "retainAckedMessages": { - "description": "Indicates whether to retain acknowledged messages. If true, then\nmessages are not expunged from the subscription's backlog, even if they are\nacknowledged, until they fall out of the `message_retention_duration`\nwindow. This must be true if you would like to\n\u003ca href=\"/pubsub/docs/replay-overview#seek_to_a_time\"\u003eSeek to a timestamp\u003c/a\u003e.\n\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Indicates whether to retain acknowledged messages. If true, then\nmessages are not expunged from the subscription's backlog, even if they are\nacknowledged, until they fall out of the `message_retention_duration`\nwindow.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", "type": "boolean" }, "topic": { @@ -1570,7 +1569,7 @@ "type": "object" }, "UpdateSnapshotRequest": { - "description": "Request for the UpdateSnapshot method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + "description": "Request for the UpdateSnapshot method.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", "id": "UpdateSnapshotRequest", "properties": { "snapshot": { diff --git a/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go b/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go index 9d235b14..06e1cc70 100644 --- a/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go +++ b/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go @@ -16,16 +16,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -255,8 +254,8 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // CreateSnapshotRequest: Request for the `CreateSnapshot` // method.

-// BETA: This feature is part of a beta release. This API might -// be changed in +// ALPHA: This feature is part of an alpha release. This API +// might be changed in // backward-incompatible ways and is not recommended for production // use. // It is not subject to any SLA or deprecation policy. @@ -376,8 +375,8 @@ func (s *Expr) MarshalJSON() ([]byte, error) { // ListSnapshotsResponse: Response for the `ListSnapshots` // method.

-// BETA: This feature is part of a beta release. This API might -// be +// ALPHA: This feature is part of an alpha release. This API +// might be // changed in backward-incompatible ways and is not recommended for // production // use. It is not subject to any SLA or deprecation policy. @@ -459,8 +458,8 @@ func (s *ListSubscriptionsResponse) MarshalJSON() ([]byte, error) { // ListTopicSnapshotsResponse: Response for the `ListTopicSnapshots` // method.

-// BETA: This feature is part of a beta release. This API might -// be +// ALPHA: This feature is part of an alpha release. This API +// might be // changed in backward-incompatible ways and is not recommended for // production // use. It is not subject to any SLA or deprecation policy. @@ -1048,9 +1047,9 @@ func (s *ReceivedMessage) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SeekRequest: Request for the `Seek` method.

-// BETA: This feature is part of a beta release. This API might -// be +// SeekRequest: Request for the `Seek` method.

+// ALPHA: This feature is part of an alpha release. This API +// might be // changed in backward-incompatible ways and is not recommended for // production // use. It is not subject to any SLA or deprecation policy. @@ -1105,8 +1104,6 @@ func (s *SeekRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SeekResponse: Response for the `Seek` method (this response is -// empty). type SeekResponse struct { // ServerResponse contains the HTTP response code and headers from the // server. @@ -1146,16 +1143,9 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Snapshot: A snapshot resource. Snapshots are used in -// Seek operations, which -// allow -// you to manage message acknowledgments in bulk. That is, you can set -// the -// acknowledgment state of messages in an existing subscription to the -// state -// captured by a snapshot.

-// BETA: This feature is part of a beta release. This API might -// be +// Snapshot: A snapshot resource.

+// ALPHA: This feature is part of an alpha release. This API +// might be // changed in backward-incompatible ways and is not recommended for // production // use. It is not subject to any SLA or deprecation policy. @@ -1266,8 +1256,8 @@ type Subscription struct { // can be done. Defaults to 7 days. Cannot be more than 7 days or less // than 10 // minutes.

- // BETA: This feature is part of a beta release. This API might - // be + // ALPHA: This feature is part of an alpha release. This API + // might be // changed in backward-incompatible ways and is not recommended for // production // use. It is not subject to any SLA or deprecation policy. @@ -1299,12 +1289,9 @@ type Subscription struct { // they are // acknowledged, until they fall out of the // `message_retention_duration` - // window. This must be true if you would like to - // Seek to a - // timestamp. - //

- // BETA: This feature is part of a beta release. This API might - // be + // window.

+ // ALPHA: This feature is part of an alpha release. This API + // might be // changed in backward-incompatible ways and is not recommended for // production // use. It is not subject to any SLA or deprecation policy. @@ -1464,8 +1451,8 @@ func (s *Topic) MarshalJSON() ([]byte, error) { // UpdateSnapshotRequest: Request for the UpdateSnapshot // method.

-// BETA: This feature is part of a beta release. This API might -// be +// ALPHA: This feature is part of an alpha release. This API +// might be // changed in backward-incompatible ways and is not recommended for // production // use. It is not subject to any SLA or deprecation policy. @@ -1585,21 +1572,13 @@ type ProjectsSnapshotsCreateCall struct { header_ http.Header } -// Create: Creates a snapshot from the requested subscription. Snapshots -// are used in -// Seek operations, which -// allow -// you to manage message acknowledgments in bulk. That is, you can set -// the -// acknowledgment state of messages in an existing subscription to the -// state -// captured by a snapshot. -//

-// BETA: This feature is part of a beta release. This API might -// be +// Create: Creates a snapshot from the requested +// subscription.

+// ALPHA: This feature is part of an alpha release. This API +// might be // changed in backward-incompatible ways and is not recommended for // production -// use. It is not subject to any SLA or deprecation policy.

+// use. It is not subject to any SLA or deprecation policy. // If the snapshot already exists, returns `ALREADY_EXISTS`. // If the requested subscription doesn't exist, returns `NOT_FOUND`. // If the backlog in the subscription is too old -- and the resulting @@ -1662,13 +1641,9 @@ func (c *ProjectsSnapshotsCreateCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1714,7 +1689,7 @@ func (c *ProjectsSnapshotsCreateCall) Do(opts ...googleapi.CallOption) (*Snapsho } return ret, nil // { - // "description": "Creates a snapshot from the requested subscription. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\n\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\u003cbr\u003e\u003cbr\u003e\nIf the snapshot already exists, returns `ALREADY_EXISTS`.\nIf the requested subscription doesn't exist, returns `NOT_FOUND`.\nIf the backlog in the subscription is too old -- and the resulting snapshot\nwould expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.\nSee also the `Snapshot.expire_time` field. If the name is not provided in\nthe request, the server will assign a random\nname for this snapshot on the same project as the subscription, conforming\nto the [resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated\nname is populated in the returned Snapshot object. Note that for REST API\nrequests, you must specify a name in the request.", + // "description": "Creates a snapshot from the requested subscription.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nIf the snapshot already exists, returns `ALREADY_EXISTS`.\nIf the requested subscription doesn't exist, returns `NOT_FOUND`.\nIf the backlog in the subscription is too old -- and the resulting snapshot\nwould expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.\nSee also the `Snapshot.expire_time` field. If the name is not provided in\nthe request, the server will assign a random\nname for this snapshot on the same project as the subscription, conforming\nto the [resource name format](https://cloud.google.com/pubsub/docs/overview#names).\nThe generated\nname is populated in the returned Snapshot object. Note that for REST API\nrequests, you must specify a name in the request.", // "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", // "httpMethod": "PUT", // "id": "pubsub.projects.snapshots.create", @@ -1723,7 +1698,7 @@ func (c *ProjectsSnapshotsCreateCall) Do(opts ...googleapi.CallOption) (*Snapsho // ], // "parameters": { // "name": { - // "description": "Optional user-provided name for this snapshot.\nIf the name is not provided in the request, the server will assign a random\nname for this snapshot on the same project as the subscription.\nNote that for REST API requests, you must specify a name. See the\n\u003ca href=\"/pubsub/docs/admin#resource_names\"\u003eresource name rules\u003c/a\u003e.\nFormat is `projects/{project}/snapshots/{snap}`.", + // "description": "Optional user-provided name for this snapshot.\nIf the name is not provided in the request, the server will assign a random\nname for this snapshot on the same project as the subscription.\nNote that for REST API requests, you must specify a name.\nFormat is `projects/{project}/snapshots/{snap}`.", // "location": "path", // "pattern": "^projects/[^/]+/snapshots/[^/]+$", // "required": true, @@ -1755,16 +1730,9 @@ type ProjectsSnapshotsDeleteCall struct { header_ http.Header } -// Delete: Removes an existing snapshot. Snapshots are used in -// Seek operations, which -// allow -// you to manage message acknowledgments in bulk. That is, you can set -// the -// acknowledgment state of messages in an existing subscription to the -// state -// captured by a snapshot.

-// BETA: This feature is part of a beta release. This API might -// be +// Delete: Removes an existing snapshot.

+// ALPHA: This feature is part of an alpha release. This API +// might be // changed in backward-incompatible ways and is not recommended for // production // use. It is not subject to any SLA or deprecation policy. @@ -1815,13 +1783,9 @@ func (c *ProjectsSnapshotsDeleteCall) doRequest(alt string) (*http.Response, err reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+snapshot}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "snapshot": c.snapshot, @@ -1867,7 +1831,7 @@ func (c *ProjectsSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, } return ret, nil // { - // "description": "Removes an existing snapshot. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nWhen the snapshot is deleted, all messages retained in the snapshot\nare immediately dropped. After a snapshot is deleted, a new one may be\ncreated with the same name, but the new one has no association with the old\nsnapshot or its subscription, unless the same subscription is specified.", + // "description": "Removes an existing snapshot. \u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nWhen the snapshot is deleted, all messages retained in the snapshot\nare immediately dropped. After a snapshot is deleted, a new one may be\ncreated with the same name, but the new one has no association with the old\nsnapshot or its subscription, unless the same subscription is specified.", // "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", // "httpMethod": "DELETE", // "id": "pubsub.projects.snapshots.delete", @@ -1906,17 +1870,10 @@ type ProjectsSnapshotsGetCall struct { header_ http.Header } -// Get: Gets the configuration details of a snapshot. Snapshots are used -// in -// Seek operations, which -// allow -// you to manage message acknowledgments in bulk. That is, you can set -// the -// acknowledgment state of messages in an existing subscription to the -// state -// captured by a snapshot.

-// BETA: This feature is part of a beta release. This API might -// be +// Get: Gets the configuration details of a +// snapshot.

+// ALPHA: This feature is part of an alpha release. This API +// might be // changed in backward-incompatible ways and is not recommended for // production // use. It is not subject to any SLA or deprecation policy. @@ -1972,13 +1929,9 @@ func (c *ProjectsSnapshotsGetCall) 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, "v1/{+snapshot}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "snapshot": c.snapshot, @@ -2024,7 +1977,7 @@ func (c *ProjectsSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, } return ret, nil // { - // "description": "Gets the configuration details of a snapshot. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + // "description": "Gets the configuration details of a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", // "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", // "httpMethod": "GET", // "id": "pubsub.projects.snapshots.get", @@ -2119,13 +2072,9 @@ func (c *ProjectsSnapshotsGetIamPolicyCall) 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, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2210,16 +2159,9 @@ type ProjectsSnapshotsListCall struct { header_ http.Header } -// List: Lists the existing snapshots. Snapshots are used in -// Seek operations, which -// allow -// you to manage message acknowledgments in bulk. That is, you can set -// the -// acknowledgment state of messages in an existing subscription to the -// state -// captured by a snapshot.

-// BETA: This feature is part of a beta release. This API might -// be +// List: Lists the existing snapshots.

+// ALPHA: This feature is part of an alpha release. This API +// might be // changed in backward-incompatible ways and is not recommended for // production // use. It is not subject to any SLA or deprecation policy. @@ -2292,13 +2234,9 @@ func (c *ProjectsSnapshotsListCall) 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, "v1/{+project}/snapshots") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -2344,7 +2282,7 @@ func (c *ProjectsSnapshotsListCall) Do(opts ...googleapi.CallOption) (*ListSnaps } return ret, nil // { - // "description": "Lists the existing snapshots. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + // "description": "Lists the existing snapshots.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", // "flatPath": "v1/projects/{projectsId}/snapshots", // "httpMethod": "GET", // "id": "pubsub.projects.snapshots.list", @@ -2415,16 +2353,9 @@ type ProjectsSnapshotsPatchCall struct { header_ http.Header } -// Patch: Updates an existing snapshot. Snapshots are used in -// Seek operations, which -// allow -// you to manage message acknowledgments in bulk. That is, you can set -// the -// acknowledgment state of messages in an existing subscription to the -// state -// captured by a snapshot.

-// BETA: This feature is part of a beta release. This API might -// be +// Patch: Updates an existing snapshot.

+// ALPHA: This feature is part of an alpha release. This API +// might be // changed in backward-incompatible ways and is not recommended for // production // use. It is not subject to any SLA or deprecation policy. @@ -2474,13 +2405,9 @@ func (c *ProjectsSnapshotsPatchCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2526,7 +2453,7 @@ func (c *ProjectsSnapshotsPatchCall) Do(opts ...googleapi.CallOption) (*Snapshot } return ret, nil // { - // "description": "Updates an existing snapshot. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nNote that certain properties of a snapshot are not modifiable.", + // "description": "Updates an existing snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.\nNote that certain properties of a snapshot are not modifiable.", // "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", // "httpMethod": "PATCH", // "id": "pubsub.projects.snapshots.patch", @@ -2616,13 +2543,9 @@ func (c *ProjectsSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2766,13 +2689,9 @@ func (c *ProjectsSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2916,13 +2835,9 @@ func (c *ProjectsSubscriptionsAcknowledgeCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+subscription}:acknowledge") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "subscription": c.subscription, @@ -3072,13 +2987,9 @@ func (c *ProjectsSubscriptionsCreateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3213,13 +3124,9 @@ func (c *ProjectsSubscriptionsDeleteCall) doRequest(alt string) (*http.Response, reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+subscription}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "subscription": c.subscription, @@ -3357,13 +3264,9 @@ func (c *ProjectsSubscriptionsGetCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+subscription}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "subscription": c.subscription, @@ -3504,13 +3407,9 @@ func (c *ProjectsSubscriptionsGetIamPolicyCall) 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, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -3665,13 +3564,9 @@ func (c *ProjectsSubscriptionsListCall) 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, "v1/{+project}/subscriptions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -3842,13 +3737,9 @@ func (c *ProjectsSubscriptionsModifyAckDeadlineCall) doRequest(alt string) (*htt } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+subscription}:modifyAckDeadline") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "subscription": c.subscription, @@ -3992,13 +3883,9 @@ func (c *ProjectsSubscriptionsModifyPushConfigCall) doRequest(alt string) (*http } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+subscription}:modifyPushConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "subscription": c.subscription, @@ -4134,13 +4021,9 @@ func (c *ProjectsSubscriptionsPatchCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4278,13 +4161,9 @@ func (c *ProjectsSubscriptionsPullCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+subscription}:pull") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "subscription": c.subscription, @@ -4374,18 +4253,9 @@ type ProjectsSubscriptionsSeekCall struct { // Seek: Seeks an existing subscription to a point in time or to a given // snapshot, -// whichever is provided in the request. Snapshots are used in -// Seek operations, which -// allow -// you to manage message acknowledgments in bulk. That is, you can set -// the -// acknowledgment state of messages in an existing subscription to the -// state -// captured by a snapshot. Note that both the subscription and the -// snapshot -// must be on the same topic.

-// BETA: This feature is part of a beta release. This API might -// be +// whichever is provided in the request.

+// ALPHA: This feature is part of an alpha release. This API +// might be // changed in backward-incompatible ways and is not recommended for // production // use. It is not subject to any SLA or deprecation policy. @@ -4434,13 +4304,9 @@ func (c *ProjectsSubscriptionsSeekCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+subscription}:seek") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "subscription": c.subscription, @@ -4486,7 +4352,7 @@ func (c *ProjectsSubscriptionsSeekCall) Do(opts ...googleapi.CallOption) (*SeekR } return ret, nil // { - // "description": "Seeks an existing subscription to a point in time or to a given snapshot,\nwhichever is provided in the request. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot. Note that both the subscription and the snapshot\nmust be on the same topic.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + // "description": "Seeks an existing subscription to a point in time or to a given snapshot,\nwhichever is provided in the request.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", // "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:seek", // "httpMethod": "POST", // "id": "pubsub.projects.subscriptions.seek", @@ -4576,13 +4442,9 @@ func (c *ProjectsSubscriptionsSetIamPolicyCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -4726,13 +4588,9 @@ func (c *ProjectsSubscriptionsTestIamPermissionsCall) doRequest(alt string) (*ht } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -4867,13 +4725,9 @@ func (c *ProjectsTopicsCreateCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5008,13 +4862,9 @@ func (c *ProjectsTopicsDeleteCall) doRequest(alt string) (*http.Response, error) reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+topic}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "topic": c.topic, @@ -5152,13 +5002,9 @@ func (c *ProjectsTopicsGetCall) 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, "v1/{+topic}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "topic": c.topic, @@ -5299,13 +5145,9 @@ func (c *ProjectsTopicsGetIamPolicyCall) 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, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -5460,13 +5302,9 @@ func (c *ProjectsTopicsListCall) 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, "v1/{+project}/topics") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -5631,13 +5469,9 @@ func (c *ProjectsTopicsPatchCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5773,13 +5607,9 @@ func (c *ProjectsTopicsPublishCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+topic}:publish") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "topic": c.topic, @@ -5915,13 +5745,9 @@ func (c *ProjectsTopicsSetIamPolicyCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -6065,13 +5891,9 @@ func (c *ProjectsTopicsTestIamPermissionsCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -6159,17 +5981,10 @@ type ProjectsTopicsSnapshotsListCall struct { header_ http.Header } -// List: Lists the names of the snapshots on this topic. Snapshots are -// used in -// Seek operations, which -// allow -// you to manage message acknowledgments in bulk. That is, you can set -// the -// acknowledgment state of messages in an existing subscription to the -// state -// captured by a snapshot.

-// BETA: This feature is part of a beta release. This API might -// be +// List: Lists the names of the snapshots on this +// topic.

+// ALPHA: This feature is part of an alpha release. This API +// might be // changed in backward-incompatible ways and is not recommended for // production // use. It is not subject to any SLA or deprecation policy. @@ -6242,13 +6057,9 @@ func (c *ProjectsTopicsSnapshotsListCall) 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, "v1/{+topic}/snapshots") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "topic": c.topic, @@ -6294,7 +6105,7 @@ func (c *ProjectsTopicsSnapshotsListCall) Do(opts ...googleapi.CallOption) (*Lis } return ret, nil // { - // "description": "Lists the names of the snapshots on this topic. Snapshots are used in\n\u003ca href=\"/pubsub/docs/replay-overview\"\u003eSeek\u003c/a\u003e operations, which allow\nyou to manage message acknowledgments in bulk. That is, you can set the\nacknowledgment state of messages in an existing subscription to the state\ncaptured by a snapshot.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eBETA:\u003c/b\u003e This feature is part of a beta release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", + // "description": "Lists the names of the snapshots on this topic.\u003cbr\u003e\u003cbr\u003e\n\u003cb\u003eALPHA:\u003c/b\u003e This feature is part of an alpha release. This API might be\nchanged in backward-incompatible ways and is not recommended for production\nuse. It is not subject to any SLA or deprecation policy.", // "flatPath": "v1/projects/{projectsId}/topics/{topicsId}/snapshots", // "httpMethod": "GET", // "id": "pubsub.projects.topics.snapshots.list", @@ -6435,13 +6246,9 @@ func (c *ProjectsTopicsSubscriptionsListCall) doRequest(alt string) (*http.Respo } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+topic}/subscriptions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "topic": c.topic, diff --git a/vendor/google.golang.org/api/redis/v1beta1/redis-api.json b/vendor/google.golang.org/api/redis/v1beta1/redis-api.json index e05984e7..fe3e5cfa 100644 --- a/vendor/google.golang.org/api/redis/v1beta1/redis-api.json +++ b/vendor/google.golang.org/api/redis/v1beta1/redis-api.json @@ -458,7 +458,7 @@ } } }, - "revision": "20181031", + "revision": "20180816", "rootUrl": "https://redis.googleapis.com/", "schemas": { "Empty": { @@ -573,10 +573,6 @@ "description": "Required. Unique name of the resource in this scope including project and\nlocation using the form:\n `projects/{project_id}/locations/{location_id}/instances/{instance_id}`\n\nNote: Redis instances are managed and addressed at regional level so\nlocation_id here refers to a GCP region; however, users may choose which\nspecific zone (or collection of zones for cross-zone instances) an instance\nshould be provisioned in. Refer to [location_id] and\n[alternative_location_id] fields for more details.", "type": "string" }, - "persistenceIamIdentity": { - "description": "Output only. IAM identity used by import / export operations to transfer\ndata to/from GCS. Format is \"serviceAccount:\u003cservice_account_email\u003e\". The\nvalue may change over time for a given instance so should be checked before\neach import/export operation.", - "type": "string" - }, "port": { "description": "Output only. The port number of the exposed Redis endpoint.", "format": "int32", @@ -607,6 +603,7 @@ "DELETING", "REPAIRING", "MAINTENANCE", + "EXPORTING", "IMPORTING" ], "enumDescriptions": [ @@ -617,6 +614,7 @@ "Redis instance is being deleted.", "Redis instance is being repaired and may be unusable. Details can be\nfound in the `status_message` field.", "Maintenance is being performed on this Redis instance.", + "Redis instance is exporting data.", "Redis instance is importing data (availability may be affected)." ], "type": "string" @@ -656,13 +654,6 @@ "nextPageToken": { "description": "Token to retrieve the next page of results, or empty if there are no more\nresults in the list.", "type": "string" - }, - "unreachable": { - "description": "Locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" } }, "type": "object" diff --git a/vendor/google.golang.org/api/redis/v1beta1/redis-gen.go b/vendor/google.golang.org/api/redis/v1beta1/redis-gen.go index 9dcf1a07..ca21ad05 100644 --- a/vendor/google.golang.org/api/redis/v1beta1/redis-gen.go +++ b/vendor/google.golang.org/api/redis/v1beta1/redis-gen.go @@ -1,6 +1,6 @@ // Package redis provides access to the Google Cloud Memorystore for Redis API. // -// This package is DEPRECATED. Use package cloud.google.com/go/redis/apiv1 instead. +// This package is DEPRECATED. Use package cloud.google.com/go/redis/apiv1beta1 instead. // // See https://cloud.google.com/memorystore/docs/redis/ // @@ -16,16 +16,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -319,15 +318,6 @@ type Instance struct { // [alternative_location_id] fields for more details. Name string `json:"name,omitempty"` - // PersistenceIamIdentity: Output only. IAM identity used by import / - // export operations to transfer - // data to/from GCS. Format is - // "serviceAccount:". The - // value may change over time for a given instance so should be checked - // before - // each import/export operation. - PersistenceIamIdentity string `json:"persistenceIamIdentity,omitempty"` - // Port: Output only. The port number of the exposed Redis endpoint. Port int64 `json:"port,omitempty"` @@ -374,6 +364,7 @@ type Instance struct { // found in the `status_message` field. // "MAINTENANCE" - Maintenance is being performed on this Redis // instance. + // "EXPORTING" - Redis instance is exporting data. // "IMPORTING" - Redis instance is importing data (availability may be // affected). State string `json:"state,omitempty"` @@ -446,9 +437,6 @@ type ListInstancesResponse struct { // results in the list. NextPageToken string `json:"nextPageToken,omitempty"` - // Unreachable: Locations that could not be reached. - Unreachable []string `json:"unreachable,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -875,13 +863,9 @@ func (c *ProjectsLocationsGetCall) 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1040,13 +1024,9 @@ func (c *ProjectsLocationsListCall) 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, "v1beta1/{+name}/locations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1244,13 +1224,9 @@ func (c *ProjectsLocationsInstancesCreateCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/instances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -1383,13 +1359,9 @@ func (c *ProjectsLocationsInstancesDeleteCall) doRequest(alt string) (*http.Resp 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1526,13 +1498,9 @@ func (c *ProjectsLocationsInstancesGetCall) 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1701,13 +1669,9 @@ func (c *ProjectsLocationsInstancesListCall) 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, "v1beta1/{+parent}/instances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -1891,13 +1855,9 @@ func (c *ProjectsLocationsInstancesPatchCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2046,13 +2006,9 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res 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, "v1beta1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2181,13 +2137,9 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2328,13 +2280,9 @@ func (c *ProjectsLocationsOperationsGetCall) 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2508,13 +2456,9 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, diff --git a/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-api.json b/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-api.json index f91bdc4c..173385a7 100644 --- a/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-api.json +++ b/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-api.json @@ -798,7 +798,7 @@ } } }, - "revision": "20181022", + "revision": "20180730", "rootUrl": "https://runtimeconfig.googleapis.com/", "schemas": { "Binding": { @@ -824,7 +824,7 @@ "type": "object" }, "Cardinality": { - "description": "A Cardinality condition for the Waiter resource. A cardinality condition is\nmet when the number of variables under a specified path prefix reaches a\npredefined number. For example, if you set a Cardinality condition where\nthe `path` is set to `/foo` and the number of paths is set to `2`, the\nfollowing variables would meet the condition in a RuntimeConfig resource:\n\n+ `/foo/variable1 = \"value1\"`\n+ `/foo/variable2 = \"value2\"`\n+ `/bar/variable3 = \"value3\"`\n\nIt would not satisfy the same condition with the `number` set to\n`3`, however, because there is only 2 paths that start with `/foo`.\nCardinality conditions are recursive; all subtrees under the specific\npath prefix are counted.", + "description": "A Cardinality condition for the Waiter resource. A cardinality condition is\nmet when the number of variables under a specified path prefix reaches a\npredefined number. For example, if you set a Cardinality condition where\nthe `path` is set to `/foo` and the number of paths is set to 2, the\nfollowing variables would meet the condition in a RuntimeConfig resource:\n\n+ `/foo/variable1 = \"value1\"`\n+ `/foo/variable2 = \"value2\"`\n+ `/bar/variable3 = \"value3\"`\n\nIt would not would not satisify the same condition with the `number` set to\n3, however, because there is only 2 paths that start with `/foo`.\nCardinality conditions are recursive; all subtrees under the specific\npath prefix are counted.", "id": "Cardinality", "properties": { "number": { @@ -1100,7 +1100,7 @@ "type": "string" }, "updateTime": { - "description": "Output only. The time of the last variable update.\nTimestamp will be UTC timestamp.", + "description": "Output only. The time of the last variable update.", "format": "google-datetime", "type": "string" }, diff --git a/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-gen.go b/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-gen.go index 841d14c2..9a67e966 100644 --- a/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-gen.go +++ b/vendor/google.golang.org/api/runtimeconfig/v1beta1/runtimeconfig-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -215,7 +214,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // reaches a // predefined number. For example, if you set a Cardinality condition // where -// the `path` is set to `/foo` and the number of paths is set to `2`, +// the `path` is set to `/foo` and the number of paths is set to 2, // the // following variables would meet the condition in a RuntimeConfig // resource: @@ -224,8 +223,9 @@ func (s *Binding) MarshalJSON() ([]byte, error) { // + `/foo/variable2 = "value2" // + `/bar/variable3 = "value3" // -// It would not satisfy the same condition with the `number` set to -// `3`, however, because there is only 2 paths that start with +// It would not would not satisify the same condition with the `number` +// set to +// 3, however, because there is only 2 paths that start with // `/foo`. // Cardinality conditions are recursive; all subtrees under the // specific @@ -1019,9 +1019,7 @@ type Variable struct { // `text: "my text value". The string must be valid UTF-8. Text string `json:"text,omitempty"` - // UpdateTime: Output only. The time of the last variable - // update. - // Timestamp will be UTC timestamp. + // UpdateTime: Output only. The time of the last variable update. UpdateTime string `json:"updateTime,omitempty"` // Value: The binary value of the variable. The length of the value must @@ -1289,13 +1287,9 @@ func (c *ProjectsConfigsCreateCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/configs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -1427,13 +1421,9 @@ func (c *ProjectsConfigsDeleteCall) doRequest(alt string) (*http.Response, error 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1571,13 +1561,9 @@ func (c *ProjectsConfigsGetCall) 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1718,13 +1704,9 @@ func (c *ProjectsConfigsGetIamPolicyCall) 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, "v1beta1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -1878,13 +1860,9 @@ func (c *ProjectsConfigsListCall) 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, "v1beta1/{+parent}/configs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -2049,13 +2027,9 @@ func (c *ProjectsConfigsSetIamPolicyCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2199,13 +2173,9 @@ func (c *ProjectsConfigsTestIamPermissionsCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2340,13 +2310,9 @@ func (c *ProjectsConfigsUpdateCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2491,13 +2457,9 @@ func (c *ProjectsConfigsOperationsGetCall) 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2638,13 +2600,9 @@ func (c *ProjectsConfigsOperationsTestIamPermissionsCall) doRequest(alt string) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2806,13 +2764,9 @@ func (c *ProjectsConfigsVariablesCreateCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/variables") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -2960,13 +2914,9 @@ func (c *ProjectsConfigsVariablesDeleteCall) doRequest(alt string) (*http.Respon 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3109,13 +3059,9 @@ func (c *ProjectsConfigsVariablesGetCall) 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3296,13 +3242,9 @@ func (c *ProjectsConfigsVariablesListCall) 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, "v1beta1/{+parent}/variables") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -3485,13 +3427,9 @@ func (c *ProjectsConfigsVariablesTestIamPermissionsCall) doRequest(alt string) ( } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -3625,13 +3563,9 @@ func (c *ProjectsConfigsVariablesUpdateCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3786,13 +3720,9 @@ func (c *ProjectsConfigsVariablesWatchCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:watch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -3952,13 +3882,9 @@ func (c *ProjectsConfigsWaitersCreateCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/waiters") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -4090,13 +4016,9 @@ func (c *ProjectsConfigsWaitersDeleteCall) doRequest(alt string) (*http.Response 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4234,13 +4156,9 @@ func (c *ProjectsConfigsWaitersGetCall) 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4394,13 +4312,9 @@ func (c *ProjectsConfigsWaitersListCall) 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, "v1beta1/{+parent}/waiters") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -4573,13 +4487,9 @@ func (c *ProjectsConfigsWaitersTestIamPermissionsCall) doRequest(alt string) (*h } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, diff --git a/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-api.json b/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-api.json index bfcf66c1..ffb1eeaf 100644 --- a/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-api.json +++ b/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-api.json @@ -339,7 +339,7 @@ ], "parameters": { "configId": { - "description": "The id of the service configuration resource.\n\nThis field must be specified for the server to return all fields, including\n`SourceInfo`.", + "description": "The id of the service configuration resource.", "location": "query", "type": "string" }, @@ -569,7 +569,7 @@ ], "parameters": { "configId": { - "description": "The id of the service configuration resource.\n\nThis field must be specified for the server to return all fields, including\n`SourceInfo`.", + "description": "The id of the service configuration resource.", "location": "path", "required": true, "type": "string" @@ -876,7 +876,7 @@ } } }, - "revision": "20181005", + "revision": "20180813", "rootUrl": "https://servicemanagement.googleapis.com/", "schemas": { "Advice": { @@ -1840,7 +1840,7 @@ "type": "object" }, "HttpRule": { - "description": "# gRPC Transcoding\n\ngRPC Transcoding is a feature for mapping between a gRPC method and one or\nmore HTTP REST endpoints. It allows developers to build a single API service\nthat supports both gRPC APIs and REST APIs. Many systems, including [Google\nAPIs](https://github.com/googleapis/googleapis),\n[Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC\nGateway](https://github.com/grpc-ecosystem/grpc-gateway),\nand [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature\nand use it for large scale production services.\n\n`HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies\nhow different portions of the gRPC request message are mapped to the URL\npath, URL query parameters, and HTTP request body. It also controls how the\ngRPC response message is mapped to the HTTP response body. `HttpRule` is\ntypically specified as an `google.api.http` annotation on the gRPC method.\n\nEach mapping specifies a URL path template and an HTTP method. The path\ntemplate may refer to one or more fields in the gRPC request message, as long\nas each field is a non-repeated field with a primitive (non-message) type.\nThe path template controls how fields of the request message are mapped to\nthe URL path.\n\nExample:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/{name=messages/*}\"\n };\n }\n }\n message GetMessageRequest {\n string name = 1; // Mapped to URL path.\n }\n message Message {\n string text = 1; // The resource content.\n }\n\nThis enables an HTTP REST to gRPC mapping as below:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")`\n\nAny fields in the request message which are not bound by the path template\nautomatically become HTTP query parameters if there is no HTTP request body.\nFor example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get:\"/v1/messages/{message_id}\"\n };\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // Mapped to URL path.\n int64 revision = 2; // Mapped to URL query parameter `revision`.\n SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.\n }\n\nThis enables a HTTP JSON to RPC mapping as below:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))`\n\nNote that fields which are mapped to URL query parameters must have a\nprimitive type or a repeated primitive type or a non-repeated message type.\nIn the case of a repeated type, the parameter can be repeated in the URL\nas `...?param=A\u0026param=B`. In the case of a message type, each field of the\nmessage is mapped to a separate parameter, such as\n`...?foo.a=A\u0026foo.b=B\u0026foo.c=C`.\n\nFor HTTP methods that allow a request body, the `body` field\nspecifies the mapping. Consider a REST update method on the\nmessage resource collection:\n\n service Messaging {\n rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n option (google.api.http) = {\n patch: \"/v1/messages/{message_id}\"\n body: \"message\"\n };\n }\n }\n message UpdateMessageRequest {\n string message_id = 1; // mapped to the URL\n Message message = 2; // mapped to the body\n }\n\nThe following HTTP JSON to RPC mapping is enabled, where the\nrepresentation of the JSON in the request body is determined by\nprotos JSON encoding:\n\nHTTP | gRPC\n-----|-----\n`PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n\nThe special name `*` can be used in the body mapping to define that\nevery field not bound by the path template should be mapped to the\nrequest body. This enables the following alternative definition of\nthe update method:\n\n service Messaging {\n rpc UpdateMessage(Message) returns (Message) {\n option (google.api.http) = {\n patch: \"/v1/messages/{message_id}\"\n body: \"*\"\n };\n }\n }\n message Message {\n string message_id = 1;\n string text = 2;\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled:\n\nHTTP | gRPC\n-----|-----\n`PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n\nNote that when using `*` in the body mapping, it is not possible to\nhave HTTP parameters, as all fields not bound by the path end in\nthe body. This makes this option more rarely used in practice when\ndefining REST APIs. The common usage of `*` is in custom methods\nwhich don't use the URL at all for transferring data.\n\nIt is possible to define multiple HTTP methods for one RPC by using\nthe `additional_bindings` option. Example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/messages/{message_id}\"\n additional_bindings {\n get: \"/v1/users/{user_id}/messages/{message_id}\"\n }\n };\n }\n }\n message GetMessageRequest {\n string message_id = 1;\n string user_id = 2;\n }\n\nThis enables the following two alternative HTTP JSON to RPC mappings:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")`\n`GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")`\n\n## Rules for HTTP mapping\n\n1. Leaf request fields (recursive expansion nested messages in the request\n message) are classified into three categories:\n - Fields referred by the path template. They are passed via the URL path.\n - Fields referred by the HttpRule.body. They are passed via the HTTP\n request body.\n - All other fields are passed via the URL query parameters, and the\n parameter name is the field path in the request message. A repeated\n field can be represented as multiple query parameters under the same\n name.\n 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields\n are passed via URL path and HTTP request body.\n 3. If HttpRule.body is omitted, there is no HTTP request body, all\n fields are passed via URL path and URL query parameters.\n\n### Path template syntax\n\n Template = \"/\" Segments [ Verb ] ;\n Segments = Segment { \"/\" Segment } ;\n Segment = \"*\" | \"**\" | LITERAL | Variable ;\n Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n FieldPath = IDENT { \".\" IDENT } ;\n Verb = \":\" LITERAL ;\n\nThe syntax `*` matches a single URL path segment. The syntax `**` matches\nzero or more URL path segments, which must be the last part of the URL path\nexcept the `Verb`.\n\nThe syntax `Variable` matches part of the URL path as specified by its\ntemplate. A variable template must not contain other variables. If a variable\nmatches a single path segment, its template may be omitted, e.g. `{var}`\nis equivalent to `{var=*}`.\n\nThe syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`\ncontains any reserved character, such characters should be percent-encoded\nbefore the matching.\n\nIf a variable contains exactly one path segment, such as `\"{var}\"` or\n`\"{var=*}\"`, when such a variable is expanded into a URL path on the client\nside, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The\nserver side does the reverse decoding. Such variables show up in the\n[Discovery Document](https://developers.google.com/discovery/v1/reference/apis)\nas `{var}`.\n\nIf a variable contains multiple path segments, such as `\"{var=foo/*}\"`\nor `\"{var=**}\"`, when such a variable is expanded into a URL path on the\nclient side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.\nThe server side does the reverse decoding, except \"%2F\" and \"%2f\" are left\nunchanged. Such variables show up in the\n[Discovery Document](https://developers.google.com/discovery/v1/reference/apis)\nas `{+var}`.\n\n## Using gRPC API Service Configuration\n\ngRPC API Service Configuration (service config) is a configuration language\nfor configuring a gRPC service to become a user-facing product. The\nservice config is simply the YAML representation of the `google.api.Service`\nproto message.\n\nAs an alternative to annotating your proto file, you can configure gRPC\ntranscoding in your service config YAML files. You do this by specifying a\n`HttpRule` that maps the gRPC method to a REST endpoint, achieving the same\neffect as the proto annotation. This can be particularly useful if you\nhave a proto that is reused in multiple services. Note that any transcoding\nspecified in the service config will override any matching transcoding\nconfiguration in the proto.\n\nExample:\n\n http:\n rules:\n # Selects a gRPC method and applies HttpRule to it.\n - selector: example.v1.Messaging.GetMessage\n get: /v1/messages/{message_id}/{sub.subfield}\n\n## Special notes\n\nWhen gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the\nproto to JSON conversion must follow the [proto3\nspecification](https://developers.google.com/protocol-buffers/docs/proto3#json).\n\nWhile the single segment variable follows the semantics of\n[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String\nExpansion, the multi segment variable **does not** follow RFC 6570 Section\n3.2.3 Reserved Expansion. The reason is that the Reserved Expansion\ndoes not expand special characters like `?` and `#`, which would lead\nto invalid URLs. As the result, gRPC Transcoding uses a custom encoding\nfor multi segment variables.\n\nThe path variables **must not** refer to any repeated or mapped field,\nbecause client libraries are not capable of handling such variable expansion.\n\nThe path variables **must not** capture the leading \"/\" character. The reason\nis that the most common use case \"{var}\" does not capture the leading \"/\"\ncharacter. For consistency, all path variables must share the same behavior.\n\nRepeated message fields must not be mapped to URL query parameters, because\nno client library can support such complicated mapping.\n\nIf an API needs to use a JSON array for request or response body, it can map\nthe request or response body to a repeated field. However, some gRPC\nTranscoding implementations may not support this feature.", + "description": "`HttpRule` defines the mapping of an RPC method to one or more HTTP\nREST API methods. The mapping specifies how different portions of the RPC\nrequest message are mapped to URL path, URL query parameters, and\nHTTP request body. The mapping is typically specified as an\n`google.api.http` annotation on the RPC method,\nsee \"google/api/annotations.proto\" for details.\n\nThe mapping consists of a field specifying the path template and\nmethod kind. The path template can refer to fields in the request\nmessage, as in the example below which describes a REST GET\noperation on a resource collection of messages:\n\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http).get = \"/v1/messages/{message_id}/{sub.subfield}\";\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n SubMessage sub = 2; // `sub.subfield` is url-mapped\n }\n message Message {\n string text = 1; // content of the resource\n }\n\nThe same http annotation can alternatively be expressed inside the\n`GRPC API Configuration` YAML file.\n\n http:\n rules:\n - selector: \u003cproto_package_name\u003e.Messaging.GetMessage\n get: /v1/messages/{message_id}/{sub.subfield}\n\nThis definition enables an automatic, bidrectional mapping of HTTP\nJSON to RPC. Example:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456/foo` | `GetMessage(message_id: \"123456\" sub: SubMessage(subfield: \"foo\"))`\n\nIn general, not only fields but also field paths can be referenced\nfrom a path pattern. Fields mapped to the path pattern cannot be\nrepeated and must have a primitive (non-message) type.\n\nAny fields in the request message which are not bound by the path\npattern automatically become (optional) HTTP query\nparameters. Assume the following definition of the request message:\n\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http).get = \"/v1/messages/{message_id}\";\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n int64 revision = 2; // becomes a parameter\n SubMessage sub = 3; // `sub.subfield` becomes a parameter\n }\n\n\nThis enables a HTTP JSON to RPC mapping as below:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))`\n\nNote that fields which are mapped to HTTP parameters must have a\nprimitive type or a repeated primitive type. Message types are not\nallowed. In the case of a repeated type, the parameter can be\nrepeated in the URL, as in `...?param=A\u0026param=B`.\n\nFor HTTP method kinds which allow a request body, the `body` field\nspecifies the mapping. Consider a REST update method on the\nmessage resource collection:\n\n\n service Messaging {\n rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"message\"\n };\n }\n }\n message UpdateMessageRequest {\n string message_id = 1; // mapped to the URL\n Message message = 2; // mapped to the body\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled, where the\nrepresentation of the JSON in the request body is determined by\nprotos JSON encoding:\n\nHTTP | RPC\n-----|-----\n`PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n\nThe special name `*` can be used in the body mapping to define that\nevery field not bound by the path template should be mapped to the\nrequest body. This enables the following alternative definition of\nthe update method:\n\n service Messaging {\n rpc UpdateMessage(Message) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"*\"\n };\n }\n }\n message Message {\n string message_id = 1;\n string text = 2;\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled:\n\nHTTP | RPC\n-----|-----\n`PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n\nNote that when using `*` in the body mapping, it is not possible to\nhave HTTP parameters, as all fields not bound by the path end in\nthe body. This makes this option more rarely used in practice of\ndefining REST APIs. The common usage of `*` is in custom methods\nwhich don't use the URL at all for transferring data.\n\nIt is possible to define multiple HTTP methods for one RPC by using\nthe `additional_bindings` option. Example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/messages/{message_id}\"\n additional_bindings {\n get: \"/v1/users/{user_id}/messages/{message_id}\"\n }\n };\n }\n }\n message GetMessageRequest {\n string message_id = 1;\n string user_id = 2;\n }\n\n\nThis enables the following two alternative HTTP JSON to RPC\nmappings:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")`\n`GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")`\n\n# Rules for HTTP mapping\n\nThe rules for mapping HTTP path, query parameters, and body fields\nto the request message are as follows:\n\n1. The `body` field specifies either `*` or a field path, or is\n omitted. If omitted, it indicates there is no HTTP request body.\n2. Leaf fields (recursive expansion of nested messages in the\n request) can be classified into three types:\n (a) Matched in the URL template.\n (b) Covered by body (if body is `*`, everything except (a) fields;\n else everything under the body field)\n (c) All other fields.\n3. URL query parameters found in the HTTP request are mapped to (c) fields.\n4. Any body sent with an HTTP request can contain only (b) fields.\n\nThe syntax of the path template is as follows:\n\n Template = \"/\" Segments [ Verb ] ;\n Segments = Segment { \"/\" Segment } ;\n Segment = \"*\" | \"**\" | LITERAL | Variable ;\n Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n FieldPath = IDENT { \".\" IDENT } ;\n Verb = \":\" LITERAL ;\n\nThe syntax `*` matches a single path segment. The syntax `**` matches zero\nor more path segments, which must be the last part of the path except the\n`Verb`. The syntax `LITERAL` matches literal text in the path.\n\nThe syntax `Variable` matches part of the URL path as specified by its\ntemplate. A variable template must not contain other variables. If a variable\nmatches a single path segment, its template may be omitted, e.g. `{var}`\nis equivalent to `{var=*}`.\n\nIf a variable contains exactly one path segment, such as `\"{var}\"` or\n`\"{var=*}\"`, when such a variable is expanded into a URL path, all characters\nexcept `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the\nDiscovery Document as `{var}`.\n\nIf a variable contains one or more path segments, such as `\"{var=foo/*}\"`\nor `\"{var=**}\"`, when such a variable is expanded into a URL path, all\ncharacters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables\nshow up in the Discovery Document as `{+var}`.\n\nNOTE: While the single segment variable matches the semantics of\n[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2\nSimple String Expansion, the multi segment variable **does not** match\nRFC 6570 Reserved Expansion. The reason is that the Reserved Expansion\ndoes not expand special characters like `?` and `#`, which would lead\nto invalid URLs.\n\nNOTE: the field paths in variables and in the `body` must not refer to\nrepeated fields or map fields.", "id": "HttpRule", "properties": { "additionalBindings": { @@ -1851,7 +1851,7 @@ "type": "array" }, "body": { - "description": "The name of the request field whose value is mapped to the HTTP request\nbody, or `*` for mapping all request fields not captured by the path\npattern to the HTTP body, or omitted for not having any HTTP request body.\n\nNOTE: the referred field must be present at the top-level of the request\nmessage type.", + "description": "The name of the request field whose value is mapped to the HTTP body, or\n`*` for mapping all fields not captured by the path pattern to the HTTP\nbody. NOTE: the referred field must not be a repeated field and must be\npresent at the top-level of request message type.", "type": "string" }, "custom": { @@ -1859,31 +1859,39 @@ "description": "The custom pattern is used for specifying an HTTP method that is not\nincluded in the `pattern` field, such as HEAD, or \"*\" to leave the\nHTTP method unspecified for this rule. The wild-card rule is useful\nfor services that provide content to Web (HTML) clients." }, "delete": { - "description": "Maps to HTTP DELETE. Used for deleting a resource.", + "description": "Used for deleting a resource.", "type": "string" }, "get": { - "description": "Maps to HTTP GET. Used for listing and getting information about\nresources.", + "description": "Used for listing and getting information about resources.", "type": "string" }, + "mediaDownload": { + "$ref": "MediaDownload", + "description": "Use this only for Scotty Requests. Do not use this for bytestream methods.\nFor media support, add instead [][google.bytestream.RestByteStream] as an\nAPI to your configuration." + }, + "mediaUpload": { + "$ref": "MediaUpload", + "description": "Use this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead\n[][google.bytestream.RestByteStream] as an API to your\nconfiguration for Bytestream methods." + }, "patch": { - "description": "Maps to HTTP PATCH. Used for updating a resource.", + "description": "Used for updating a resource.", "type": "string" }, "post": { - "description": "Maps to HTTP POST. Used for creating a resource or performing an action.", + "description": "Used for creating a resource.", "type": "string" }, "put": { - "description": "Maps to HTTP PUT. Used for replacing a resource.", + "description": "Used for updating a resource.", "type": "string" }, "responseBody": { - "description": "Optional. The name of the response field whose value is mapped to the HTTP\nresponse body. When omitted, the entire response message will be used\nas the HTTP response body.\n\nNOTE: The referred field must be present at the top-level of the response\nmessage type.", + "description": "Optional. The name of the response field whose value is mapped to the HTTP\nbody of response. Other response fields are ignored. When\nnot set, the response message will be used as HTTP body of response.", "type": "string" }, "selector": { - "description": "Selects a method to which this rule applies.\n\nRefer to selector for syntax details.", + "description": "Selects methods to which this rule applies.\n\nRefer to selector for syntax details.", "type": "string" } }, @@ -2070,6 +2078,81 @@ }, "type": "object" }, + "MediaDownload": { + "description": "Defines the Media configuration for a service in case of a download.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods.", + "id": "MediaDownload", + "properties": { + "completeNotification": { + "description": "A boolean that determines whether a notification for the completion of a\ndownload should be sent to the backend.", + "type": "boolean" + }, + "downloadService": { + "description": "DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.\n\nSpecify name of the download service if one is used for download.", + "type": "string" + }, + "dropzone": { + "description": "Name of the Scotty dropzone to use for the current API.", + "type": "string" + }, + "enabled": { + "description": "Whether download is enabled.", + "type": "boolean" + }, + "maxDirectDownloadSize": { + "description": "Optional maximum acceptable size for direct download.\nThe size is specified in bytes.", + "format": "int64", + "type": "string" + }, + "useDirectDownload": { + "description": "A boolean that determines if direct download from ESF should be used for\ndownload of this media.", + "type": "boolean" + } + }, + "type": "object" + }, + "MediaUpload": { + "description": "Defines the Media configuration for a service in case of an upload.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods.", + "id": "MediaUpload", + "properties": { + "completeNotification": { + "description": "A boolean that determines whether a notification for the completion of an\nupload should be sent to the backend. These notifications will not be seen\nby the client and will not consume quota.", + "type": "boolean" + }, + "dropzone": { + "description": "Name of the Scotty dropzone to use for the current API.", + "type": "string" + }, + "enabled": { + "description": "Whether upload is enabled.", + "type": "boolean" + }, + "maxSize": { + "description": "Optional maximum acceptable size for an upload.\nThe size is specified in bytes.", + "format": "int64", + "type": "string" + }, + "mimeTypes": { + "description": "An array of mimetype patterns. Esf will only accept uploads that match one\nof the given patterns.", + "items": { + "type": "string" + }, + "type": "array" + }, + "progressNotification": { + "description": "Whether to receive a notification for progress changes of media upload.", + "type": "boolean" + }, + "startNotification": { + "description": "Whether to receive a notification on the start of media upload.", + "type": "boolean" + }, + "uploadService": { + "description": "DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.\n\nSpecify name of the upload service if one is used for upload.", + "type": "string" + } + }, + "type": "object" + }, "Method": { "description": "Method represents a method of an API interface.", "id": "Method", @@ -2482,7 +2565,7 @@ "type": "object" }, "Quota": { - "description": "Quota configuration helps to achieve fairness and budgeting in service\nusage.\n\nThe quota configuration works this way:\n- The service configuration defines a set of metrics.\n- For API calls, the quota.metric_rules maps methods to metrics with\n corresponding costs.\n- The quota.limits defines limits on the metrics, which will be used for\n quota checks at runtime.\n\nAn example quota configuration in yaml format:\n\n quota:\n limits:\n\n - name: apiWriteQpsPerProject\n metric: library.googleapis.com/write_calls\n unit: \"1/min/{project}\" # rate limit for consumer projects\n values:\n STANDARD: 10000\n\n\n # The metric rules bind all methods to the read_calls metric,\n # except for the UpdateBook and DeleteBook methods. These two methods\n # are mapped to the write_calls metric, with the UpdateBook method\n # consuming at twice rate as the DeleteBook method.\n metric_rules:\n - selector: \"*\"\n metric_costs:\n library.googleapis.com/read_calls: 1\n - selector: google.example.library.v1.LibraryService.UpdateBook\n metric_costs:\n library.googleapis.com/write_calls: 2\n - selector: google.example.library.v1.LibraryService.DeleteBook\n metric_costs:\n library.googleapis.com/write_calls: 1\n\n Corresponding Metric definition:\n\n metrics:\n - name: library.googleapis.com/read_calls\n display_name: Read requests\n metric_kind: DELTA\n value_type: INT64\n\n - name: library.googleapis.com/write_calls\n display_name: Write requests\n metric_kind: DELTA\n value_type: INT64", + "description": "Quota configuration helps to achieve fairness and budgeting in service\nusage.\n\nThe quota configuration works this way:\n- The service configuration defines a set of metrics.\n- For API calls, the quota.metric_rules maps methods to metrics with\n corresponding costs.\n- The quota.limits defines limits on the metrics, which will be used for\n quota checks at runtime.\n\nAn example quota configuration in yaml format:\n\n quota:\n\n - name: apiWriteQpsPerProject\n metric: library.googleapis.com/write_calls\n unit: \"1/min/{project}\" # rate limit for consumer projects\n values:\n STANDARD: 10000\n\n\n # The metric rules bind all methods to the read_calls metric,\n # except for the UpdateBook and DeleteBook methods. These two methods\n # are mapped to the write_calls metric, with the UpdateBook method\n # consuming at twice rate as the DeleteBook method.\n metric_rules:\n - selector: \"*\"\n metric_costs:\n library.googleapis.com/read_calls: 1\n - selector: google.example.library.v1.LibraryService.UpdateBook\n metric_costs:\n library.googleapis.com/write_calls: 2\n - selector: google.example.library.v1.LibraryService.DeleteBook\n metric_costs:\n library.googleapis.com/write_calls: 1\n\n Corresponding Metric definition:\n\n metrics:\n - name: library.googleapis.com/read_calls\n display_name: Read requests\n metric_kind: DELTA\n value_type: INT64\n\n - name: library.googleapis.com/write_calls\n display_name: Write requests\n metric_kind: DELTA\n value_type: INT64", "id": "Quota", "properties": { "limits": { @@ -2677,7 +2760,7 @@ "description": "HTTP configuration." }, "id": { - "description": "A unique ID for a specific instance of this message, typically assigned\nby the client for tracking purpose. If empty, the server may choose to\ngenerate one instead. Must be no longer than 60 characters.", + "description": "A unique ID for a specific instance of this message, typically assigned\nby the client for tracking purpose. If empty, the server may choose to\ngenerate one instead.", "type": "string" }, "logging": { diff --git a/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-gen.go b/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-gen.go index 32499e7b..bec793f5 100644 --- a/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-gen.go +++ b/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -2288,119 +2287,114 @@ func (s *Http) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpRule: # gRPC Transcoding +// HttpRule: `HttpRule` defines the mapping of an RPC method to one or +// more HTTP +// REST API methods. The mapping specifies how different portions of the +// RPC +// request message are mapped to URL path, URL query parameters, +// and +// HTTP request body. The mapping is typically specified as +// an +// `google.api.http` annotation on the RPC method, +// see "google/api/annotations.proto" for details. // -// gRPC Transcoding is a feature for mapping between a gRPC method and -// one or -// more HTTP REST endpoints. It allows developers to build a single API -// service -// that supports both gRPC APIs and REST APIs. Many systems, including -// [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), -// [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this -// feature -// and use it for large scale production services. +// The mapping consists of a field specifying the path template +// and +// method kind. The path template can refer to fields in the +// request +// message, as in the example below which describes a REST GET +// operation on a resource collection of messages: // -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping -// specifies -// how different portions of the gRPC request message are mapped to the -// URL -// path, URL query parameters, and HTTP request body. It also controls -// how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` -// is -// typically specified as an `google.api.http` annotation on the gRPC -// method. -// -// Each mapping specifies a URL path template and an HTTP method. The -// path -// template may refer to one or more fields in the gRPC request message, -// as long -// as each field is a non-repeated field with a primitive (non-message) -// type. -// The path template controls how fields of the request message are -// mapped to -// the URL path. -// -// Example: // // service Messaging { // rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: -// "messages/123456")` -// -// Any fields in the request message which are not bound by the path -// template -// automatically become HTTP query parameters if there is no HTTP -// request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; +// option (google.api.http).get = +// "/v1/messages/{message_id}/{sub.subfield}"; // } // } // message GetMessageRequest { // message SubMessage { // string subfield = 1; // } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter -// `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter -// `sub.subfield`. +// string message_id = 1; // mapped to the URL +// SubMessage sub = 2; // `sub.subfield` is url-mapped // } +// message Message { +// string text = 1; // content of the resource +// } +// +// The same http annotation can alternatively be expressed inside +// the +// `GRPC API Configuration` YAML file. +// +// http: +// rules: +// - selector: .Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// This definition enables an automatic, bidrectional mapping of +// HTTP +// JSON to RPC. Example: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" +// sub: SubMessage(subfield: "foo"))` +// +// In general, not only fields but also field paths can be +// referenced +// from a path pattern. Fields mapped to the path pattern cannot +// be +// repeated and must have a primitive (non-message) type. +// +// Any fields in the request message which are not bound by the +// path +// pattern automatically become (optional) HTTP query +// parameters. Assume the following definition of the request +// message: +// +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http).get = "/v1/messages/{message_id}"; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // mapped to the URL +// int64 revision = 2; // becomes a parameter +// SubMessage sub = 3; // `sub.subfield` becomes a parameter +// } +// // // This enables a HTTP JSON to RPC mapping as below: // -// HTTP | gRPC +// HTTP | RPC // -----|----- // `GET /v1/messages/123456?revision=2&sub.subfield=foo` | // `GetMessage(message_id: "123456" revision: 2 sub: // SubMessage(subfield: "foo"))` // -// Note that fields which are mapped to URL query parameters must have +// Note that fields which are mapped to HTTP parameters must have // a -// primitive type or a repeated primitive type or a non-repeated message -// type. -// In the case of a repeated type, the parameter can be repeated in the -// URL -// as `...?param=A¶m=B`. In the case of a message type, each field -// of the -// message is mapped to a separate parameter, such -// as -// `...?foo.a=A&foo.b=B&foo.c=C`. +// primitive type or a repeated primitive type. Message types are +// not +// allowed. In the case of a repeated type, the parameter can +// be +// repeated in the URL, as in `...?param=A¶m=B`. // -// For HTTP methods that allow a request body, the `body` +// For HTTP method kinds which allow a request body, the `body` // field // specifies the mapping. Consider a REST update method on the // message resource collection: // +// // service Messaging { // rpc UpdateMessage(UpdateMessageRequest) returns (Message) { // option (google.api.http) = { -// patch: "/v1/messages/{message_id}" +// put: "/v1/messages/{message_id}" // body: "message" // }; // } @@ -2410,15 +2404,16 @@ func (s *Http) MarshalJSON() ([]byte, error) { // Message message = 2; // mapped to the body // } // +// // The following HTTP JSON to RPC mapping is enabled, where // the // representation of the JSON in the request body is determined // by // protos JSON encoding: // -// HTTP | gRPC +// HTTP | RPC // -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | +// `PUT /v1/messages/123456 { "text": "Hi!" }` | // `UpdateMessage(message_id: "123456" message { text: "Hi!" })` // // The special name `*` can be used in the body mapping to define @@ -2432,7 +2427,7 @@ func (s *Http) MarshalJSON() ([]byte, error) { // service Messaging { // rpc UpdateMessage(Message) returns (Message) { // option (google.api.http) = { -// patch: "/v1/messages/{message_id}" +// put: "/v1/messages/{message_id}" // body: "*" // }; // } @@ -2445,16 +2440,16 @@ func (s *Http) MarshalJSON() ([]byte, error) { // // The following HTTP JSON to RPC mapping is enabled: // -// HTTP | gRPC +// HTTP | RPC // -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | +// `PUT /v1/messages/123456 { "text": "Hi!" }` | // `UpdateMessage(message_id: "123456" text: "Hi!")` // // Note that when using `*` in the body mapping, it is not possible // to // have HTTP parameters, as all fields not bound by the path end in // the body. This makes this option more rarely used in practice -// when +// of // defining REST APIs. The common usage of `*` is in custom // methods // which don't use the URL at all for transferring data. @@ -2478,39 +2473,38 @@ func (s *Http) MarshalJSON() ([]byte, error) { // string user_id = 2; // } // -// This enables the following two alternative HTTP JSON to RPC +// +// This enables the following two alternative HTTP JSON to +// RPC // mappings: // -// HTTP | gRPC +// HTTP | RPC // -----|----- // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` // `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" // message_id: "123456")` // -// ## Rules for HTTP mapping +// # Rules for HTTP mapping // -// 1. Leaf request fields (recursive expansion nested messages in the -// request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the -// URL path. -// - Fields referred by the HttpRule.body. They are passed via the -// HTTP -// request body. -// - All other fields are passed via the URL query parameters, and -// the -// parameter name is the field path in the request message. A -// repeated -// field can be represented as multiple query parameters under the -// same -// name. -// 2. If HttpRule.body is "*", there is no URL query parameter, all -// fields -// are passed via URL path and HTTP request body. -// 3. If HttpRule.body is omitted, there is no HTTP request body, all -// fields are passed via URL path and URL query parameters. +// The rules for mapping HTTP path, query parameters, and body fields +// to the request message are as follows: // -// ### Path template syntax +// 1. The `body` field specifies either `*` or a field path, or is +// omitted. If omitted, it indicates there is no HTTP request +// body. +// 2. Leaf fields (recursive expansion of nested messages in the +// request) can be classified into three types: +// (a) Matched in the URL template. +// (b) Covered by body (if body is `*`, everything except (a) +// fields; +// else everything under the body field) +// (c) All other fields. +// 3. URL query parameters found in the HTTP request are mapped to (c) +// fields. +// 4. Any body sent with an HTTP request can contain only (b) +// fields. +// +// The syntax of the path template is as follows: // // Template = "/" Segments [ Verb ] ; // Segments = Segment { "/" Segment } ; @@ -2519,11 +2513,11 @@ func (s *Http) MarshalJSON() ([]byte, error) { // FieldPath = IDENT { "." IDENT } ; // Verb = ":" LITERAL ; // -// The syntax `*` matches a single URL path segment. The syntax `**` -// matches -// zero or more URL path segments, which must be the last part of the -// URL path -// except the `Verb`. +// The syntax `*` matches a single path segment. The syntax `**` matches +// zero +// or more path segments, which must be the last part of the path except +// the +// `Verb`. The syntax `LITERAL` matches literal text in the path. // // The syntax `Variable` matches part of the URL path as specified by // its @@ -2533,114 +2527,35 @@ func (s *Http) MarshalJSON() ([]byte, error) { // `{var}` // is equivalent to `{var=*}`. // -// The syntax `LITERAL` matches literal text in the URL path. If the -// `LITERAL` -// contains any reserved character, such characters should be -// percent-encoded -// before the matching. -// // If a variable contains exactly one path segment, such as "{var}" // or -// "{var=*}", when such a variable is expanded into a URL path on the -// client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. -// The -// server side does the reverse decoding. Such variables show up in -// the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) -// a -// s `{var}`. +// "{var=*}", when such a variable is expanded into a URL path, all +// characters +// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up +// in the +// Discovery Document as `{var}`. // -// If a variable contains multiple path segments, such as +// If a variable contains one or more path segments, such as // "{var=foo/*}" -// or "{var=**}", when such a variable is expanded into a URL path on -// the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are -// percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are -// left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) -// a -// s `{+var}`. +// or "{var=**}", when such a variable is expanded into a URL path, +// all +// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such +// variables +// show up in the Discovery Document as `{+var}`. // -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration -// language -// for configuring a gRPC service to become a user-facing product. -// The -// service config is simply the YAML representation of the -// `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure -// gRPC -// transcoding in your service config YAML files. You do this by -// specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving -// the same -// effect as the proto annotation. This can be particularly useful if -// you -// have a proto that is reused in multiple services. Note that any -// transcoding -// specified in the service config will override any matching -// transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, -// the -// proto to JSON conversion must follow the -// [proto3 -// specification](https://developers.google.com/protocol-buffers/ -// docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple -// String -// Expansion, the multi segment variable **does not** follow RFC 6570 -// Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved +// NOTE: While the single segment variable matches the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 +// Simple String Expansion, the multi segment variable **does not** +// match +// RFC 6570 Reserved Expansion. The reason is that the Reserved // Expansion // does not expand special characters like `?` and `#`, which would // lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom -// encoding -// for multi segment variables. +// to invalid URLs. // -// The path variables **must not** refer to any repeated or mapped -// field, -// because client libraries are not capable of handling such variable -// expansion. -// -// The path variables **must not** capture the leading "/" character. -// The reason -// is that the most common use case "{var}" does not capture the leading -// "/" -// character. For consistency, all path variables must share the same -// behavior. -// -// Repeated message fields must not be mapped to URL query parameters, -// because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it -// can map -// the request or response body to a repeated field. However, some -// gRPC -// Transcoding implementations may not support this feature. +// NOTE: the field paths in variables and in the `body` must not refer +// to +// repeated fields or map fields. type HttpRule struct { // AdditionalBindings: Additional HTTP bindings for the selector. Nested // bindings must @@ -2649,15 +2564,12 @@ type HttpRule struct { AdditionalBindings []*HttpRule `json:"additionalBindings,omitempty"` // Body: The name of the request field whose value is mapped to the HTTP - // request - // body, or `*` for mapping all request fields not captured by the - // path - // pattern to the HTTP body, or omitted for not having any HTTP request - // body. - // - // NOTE: the referred field must be present at the top-level of the - // request - // message type. + // body, or + // `*` for mapping all fields not captured by the path pattern to the + // HTTP + // body. NOTE: the referred field must not be a repeated field and must + // be + // present at the top-level of request message type. Body string `json:"body,omitempty"` // Custom: The custom pattern is used for specifying an HTTP method that @@ -2669,36 +2581,42 @@ type HttpRule struct { // for services that provide content to Web (HTML) clients. Custom *CustomHttpPattern `json:"custom,omitempty"` - // Delete: Maps to HTTP DELETE. Used for deleting a resource. + // Delete: Used for deleting a resource. Delete string `json:"delete,omitempty"` - // Get: Maps to HTTP GET. Used for listing and getting information - // about - // resources. + // Get: Used for listing and getting information about resources. Get string `json:"get,omitempty"` - // Patch: Maps to HTTP PATCH. Used for updating a resource. + // MediaDownload: Use this only for Scotty Requests. Do not use this for + // bytestream methods. + // For media support, add instead [][google.bytestream.RestByteStream] + // as an + // API to your configuration. + MediaDownload *MediaDownload `json:"mediaDownload,omitempty"` + + // MediaUpload: Use this only for Scotty Requests. Do not use this for + // media support using + // Bytestream, add instead + // [][google.bytestream.RestByteStream] as an API to your + // configuration for Bytestream methods. + MediaUpload *MediaUpload `json:"mediaUpload,omitempty"` + + // Patch: Used for updating a resource. Patch string `json:"patch,omitempty"` - // Post: Maps to HTTP POST. Used for creating a resource or performing - // an action. + // Post: Used for creating a resource. Post string `json:"post,omitempty"` - // Put: Maps to HTTP PUT. Used for replacing a resource. + // Put: Used for updating a resource. Put string `json:"put,omitempty"` // ResponseBody: Optional. The name of the response field whose value is // mapped to the HTTP - // response body. When omitted, the entire response message will be - // used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the - // response - // message type. + // body of response. Other response fields are ignored. When + // not set, the response message will be used as HTTP body of response. ResponseBody string `json:"responseBody,omitempty"` - // Selector: Selects a method to which this rule applies. + // Selector: Selects methods to which this rule applies. // // Refer to selector for syntax details. Selector string `json:"selector,omitempty"` @@ -3124,6 +3042,135 @@ func (s *ManagedService) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MediaDownload: Defines the Media configuration for a service in case +// of a download. +// Use this only for Scotty Requests. Do not use this for media support +// using +// Bytestream, add instead [][google.bytestream.RestByteStream] as an +// API to +// your configuration for Bytestream methods. +type MediaDownload struct { + // CompleteNotification: A boolean that determines whether a + // notification for the completion of a + // download should be sent to the backend. + CompleteNotification bool `json:"completeNotification,omitempty"` + + // DownloadService: DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING + // IS REMOVED. + // + // Specify name of the download service if one is used for download. + DownloadService string `json:"downloadService,omitempty"` + + // Dropzone: Name of the Scotty dropzone to use for the current API. + Dropzone string `json:"dropzone,omitempty"` + + // Enabled: Whether download is enabled. + Enabled bool `json:"enabled,omitempty"` + + // MaxDirectDownloadSize: Optional maximum acceptable size for direct + // download. + // The size is specified in bytes. + MaxDirectDownloadSize int64 `json:"maxDirectDownloadSize,omitempty,string"` + + // UseDirectDownload: A boolean that determines if direct download from + // ESF should be used for + // download of this media. + UseDirectDownload bool `json:"useDirectDownload,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CompleteNotification") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteNotification") 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 *MediaDownload) MarshalJSON() ([]byte, error) { + type NoMethod MediaDownload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MediaUpload: Defines the Media configuration for a service in case of +// an upload. +// Use this only for Scotty Requests. Do not use this for media support +// using +// Bytestream, add instead [][google.bytestream.RestByteStream] as an +// API to +// your configuration for Bytestream methods. +type MediaUpload struct { + // CompleteNotification: A boolean that determines whether a + // notification for the completion of an + // upload should be sent to the backend. These notifications will not be + // seen + // by the client and will not consume quota. + CompleteNotification bool `json:"completeNotification,omitempty"` + + // Dropzone: Name of the Scotty dropzone to use for the current API. + Dropzone string `json:"dropzone,omitempty"` + + // Enabled: Whether upload is enabled. + Enabled bool `json:"enabled,omitempty"` + + // MaxSize: Optional maximum acceptable size for an upload. + // The size is specified in bytes. + MaxSize int64 `json:"maxSize,omitempty,string"` + + // MimeTypes: An array of mimetype patterns. Esf will only accept + // uploads that match one + // of the given patterns. + MimeTypes []string `json:"mimeTypes,omitempty"` + + // ProgressNotification: Whether to receive a notification for progress + // changes of media upload. + ProgressNotification bool `json:"progressNotification,omitempty"` + + // StartNotification: Whether to receive a notification on the start of + // media upload. + StartNotification bool `json:"startNotification,omitempty"` + + // UploadService: DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING + // IS REMOVED. + // + // Specify name of the upload service if one is used for upload. + UploadService string `json:"uploadService,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CompleteNotification") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteNotification") 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 *MediaUpload) MarshalJSON() ([]byte, error) { + type NoMethod MediaUpload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Method: Method represents a method of an API interface. type Method struct { // Name: The simple name of this method. @@ -4217,7 +4264,6 @@ func (s *Policy) MarshalJSON() ([]byte, error) { // An example quota configuration in yaml format: // // quota: -// limits: // // - name: apiWriteQpsPerProject // metric: library.googleapis.com/write_calls @@ -4615,7 +4661,7 @@ type Service struct { // assigned // by the client for tracking purpose. If empty, the server may choose // to - // generate one instead. Must be no longer than 60 characters. + // generate one instead. Id string `json:"id,omitempty"` // Logging: Logging configuration. @@ -5604,13 +5650,9 @@ func (c *OperationsGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5799,13 +5841,9 @@ func (c *OperationsListCall) 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, "v1/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -5968,13 +6006,9 @@ func (c *ServicesCreateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -6096,13 +6130,9 @@ func (c *ServicesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "serviceName": c.serviceName, @@ -6237,13 +6267,9 @@ func (c *ServicesDisableCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}:disable") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "serviceName": c.serviceName, @@ -6382,13 +6408,9 @@ func (c *ServicesEnableCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}:enable") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "serviceName": c.serviceName, @@ -6536,13 +6558,9 @@ func (c *ServicesGenerateConfigReportCall) doRequest(alt string) (*http.Response } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services:generateConfigReport") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -6672,13 +6690,9 @@ func (c *ServicesGetCall) 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, "v1/services/{serviceName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "serviceName": c.serviceName, @@ -6774,10 +6788,6 @@ func (r *ServicesService) GetConfig(serviceName string) *ServicesGetConfigCall { // ConfigId sets the optional parameter "configId": The id of the // service configuration resource. -// -// This field must be specified for the server to return all fields, -// including -// `SourceInfo`. func (c *ServicesGetConfigCall) ConfigId(configId string) *ServicesGetConfigCall { c.urlParams_.Set("configId", configId) return c @@ -6841,13 +6851,9 @@ func (c *ServicesGetConfigCall) 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, "v1/services/{serviceName}/config") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "serviceName": c.serviceName, @@ -6902,7 +6908,7 @@ func (c *ServicesGetConfigCall) Do(opts ...googleapi.CallOption) (*Service, erro // ], // "parameters": { // "configId": { - // "description": "The id of the service configuration resource.\n\nThis field must be specified for the server to return all fields, including\n`SourceInfo`.", + // "description": "The id of the service configuration resource.", // "location": "query", // "type": "string" // }, @@ -6996,13 +7002,9 @@ func (c *ServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -7189,13 +7191,9 @@ func (c *ServicesListCall) 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, "v1/services") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -7360,13 +7358,9 @@ func (c *ServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -7510,13 +7504,9 @@ func (c *ServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -7653,13 +7643,9 @@ func (c *ServicesUndeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}:undelete") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "serviceName": c.serviceName, @@ -7801,13 +7787,9 @@ func (c *ServicesConfigsCreateCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}/configs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "serviceName": c.serviceName, @@ -7961,13 +7943,9 @@ func (c *ServicesConfigsGetCall) 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, "v1/services/{serviceName}/configs/{configId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "serviceName": c.serviceName, @@ -8024,7 +8002,7 @@ func (c *ServicesConfigsGetCall) Do(opts ...googleapi.CallOption) (*Service, err // ], // "parameters": { // "configId": { - // "description": "The id of the service configuration resource.\n\nThis field must be specified for the server to return all fields, including\n`SourceInfo`.", + // "description": "The id of the service configuration resource.", // "location": "path", // "required": true, // "type": "string" @@ -8139,13 +8117,9 @@ func (c *ServicesConfigsListCall) 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, "v1/services/{serviceName}/configs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "serviceName": c.serviceName, @@ -8327,13 +8301,9 @@ func (c *ServicesConfigsSubmitCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/services/{serviceName}/configs:submit") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "serviceName": c.serviceName, @@ -8469,13 +8439,9 @@ func (c *ServicesConsumersGetIamPolicyCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -8613,13 +8579,9 @@ func (c *ServicesConsumersSetIamPolicyCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -8763,13 +8725,9 @@ func (c *ServicesConsumersTestIamPermissionsCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -8925,13 +8883,9 @@ func (c *ServicesRolloutsCreateCall) 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, "v1/services/{serviceName}/rollouts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "serviceName": c.serviceName, @@ -9073,13 +9027,9 @@ func (c *ServicesRolloutsGetCall) 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, "v1/services/{serviceName}/rollouts/{rolloutId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "serviceName": c.serviceName, @@ -9258,13 +9208,9 @@ func (c *ServicesRolloutsListCall) 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, "v1/services/{serviceName}/rollouts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "serviceName": c.serviceName, diff --git a/vendor/google.golang.org/api/serviceusage/v1beta1/serviceusage-api.json b/vendor/google.golang.org/api/serviceusage/v1beta1/serviceusage-api.json index c5053cbd..86b2bfc9 100644 --- a/vendor/google.golang.org/api/serviceusage/v1beta1/serviceusage-api.json +++ b/vendor/google.golang.org/api/serviceusage/v1beta1/serviceusage-api.json @@ -338,7 +338,7 @@ } } }, - "revision": "20181004", + "revision": "20180820", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "Api": { @@ -493,6 +493,21 @@ }, "type": "object" }, + "AuthorizationRule": { + "description": "Authorization rule for API services.\n\nIt specifies the permission(s) required for an API element for the overall\nAPI request to succeed. It is typically used to mark request message fields\nthat contain the name of the resource and indicates the permissions that\nwill be checked on that resource.\n\nFor example:\n\n package google.storage.v1;\n\n message CopyObjectRequest {\n string source = 1 [\n (google.api.authz).permissions = \"storage.objects.get\"];\n\n string destination = 2 [\n (google.api.authz).permissions =\n \"storage.objects.create,storage.objects.update\"];\n }", + "id": "AuthorizationRule", + "properties": { + "permissions": { + "description": "The required permissions. The acceptable values vary depend on the\nauthorization system used. For Google APIs, it should be a comma-separated\nGoogle IAM permission values. When multiple permissions are listed, the\nsemantics is not defined by the system. Additional documentation must\nbe provided manually.", + "type": "string" + }, + "selector": { + "description": "Selects the API elements to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" + } + }, + "type": "object" + }, "Backend": { "description": "`Backend` defines the backend configuration for a service.", "id": "Backend", @@ -1290,7 +1305,7 @@ "type": "object" }, "HttpRule": { - "description": "# gRPC Transcoding\n\ngRPC Transcoding is a feature for mapping between a gRPC method and one or\nmore HTTP REST endpoints. It allows developers to build a single API service\nthat supports both gRPC APIs and REST APIs. Many systems, including [Google\nAPIs](https://github.com/googleapis/googleapis),\n[Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC\nGateway](https://github.com/grpc-ecosystem/grpc-gateway),\nand [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature\nand use it for large scale production services.\n\n`HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies\nhow different portions of the gRPC request message are mapped to the URL\npath, URL query parameters, and HTTP request body. It also controls how the\ngRPC response message is mapped to the HTTP response body. `HttpRule` is\ntypically specified as an `google.api.http` annotation on the gRPC method.\n\nEach mapping specifies a URL path template and an HTTP method. The path\ntemplate may refer to one or more fields in the gRPC request message, as long\nas each field is a non-repeated field with a primitive (non-message) type.\nThe path template controls how fields of the request message are mapped to\nthe URL path.\n\nExample:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/{name=messages/*}\"\n };\n }\n }\n message GetMessageRequest {\n string name = 1; // Mapped to URL path.\n }\n message Message {\n string text = 1; // The resource content.\n }\n\nThis enables an HTTP REST to gRPC mapping as below:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")`\n\nAny fields in the request message which are not bound by the path template\nautomatically become HTTP query parameters if there is no HTTP request body.\nFor example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get:\"/v1/messages/{message_id}\"\n };\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // Mapped to URL path.\n int64 revision = 2; // Mapped to URL query parameter `revision`.\n SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.\n }\n\nThis enables a HTTP JSON to RPC mapping as below:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))`\n\nNote that fields which are mapped to URL query parameters must have a\nprimitive type or a repeated primitive type or a non-repeated message type.\nIn the case of a repeated type, the parameter can be repeated in the URL\nas `...?param=A\u0026param=B`. In the case of a message type, each field of the\nmessage is mapped to a separate parameter, such as\n`...?foo.a=A\u0026foo.b=B\u0026foo.c=C`.\n\nFor HTTP methods that allow a request body, the `body` field\nspecifies the mapping. Consider a REST update method on the\nmessage resource collection:\n\n service Messaging {\n rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n option (google.api.http) = {\n patch: \"/v1/messages/{message_id}\"\n body: \"message\"\n };\n }\n }\n message UpdateMessageRequest {\n string message_id = 1; // mapped to the URL\n Message message = 2; // mapped to the body\n }\n\nThe following HTTP JSON to RPC mapping is enabled, where the\nrepresentation of the JSON in the request body is determined by\nprotos JSON encoding:\n\nHTTP | gRPC\n-----|-----\n`PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n\nThe special name `*` can be used in the body mapping to define that\nevery field not bound by the path template should be mapped to the\nrequest body. This enables the following alternative definition of\nthe update method:\n\n service Messaging {\n rpc UpdateMessage(Message) returns (Message) {\n option (google.api.http) = {\n patch: \"/v1/messages/{message_id}\"\n body: \"*\"\n };\n }\n }\n message Message {\n string message_id = 1;\n string text = 2;\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled:\n\nHTTP | gRPC\n-----|-----\n`PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n\nNote that when using `*` in the body mapping, it is not possible to\nhave HTTP parameters, as all fields not bound by the path end in\nthe body. This makes this option more rarely used in practice when\ndefining REST APIs. The common usage of `*` is in custom methods\nwhich don't use the URL at all for transferring data.\n\nIt is possible to define multiple HTTP methods for one RPC by using\nthe `additional_bindings` option. Example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/messages/{message_id}\"\n additional_bindings {\n get: \"/v1/users/{user_id}/messages/{message_id}\"\n }\n };\n }\n }\n message GetMessageRequest {\n string message_id = 1;\n string user_id = 2;\n }\n\nThis enables the following two alternative HTTP JSON to RPC mappings:\n\nHTTP | gRPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")`\n`GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")`\n\n## Rules for HTTP mapping\n\n1. Leaf request fields (recursive expansion nested messages in the request\n message) are classified into three categories:\n - Fields referred by the path template. They are passed via the URL path.\n - Fields referred by the HttpRule.body. They are passed via the HTTP\n request body.\n - All other fields are passed via the URL query parameters, and the\n parameter name is the field path in the request message. A repeated\n field can be represented as multiple query parameters under the same\n name.\n 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields\n are passed via URL path and HTTP request body.\n 3. If HttpRule.body is omitted, there is no HTTP request body, all\n fields are passed via URL path and URL query parameters.\n\n### Path template syntax\n\n Template = \"/\" Segments [ Verb ] ;\n Segments = Segment { \"/\" Segment } ;\n Segment = \"*\" | \"**\" | LITERAL | Variable ;\n Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n FieldPath = IDENT { \".\" IDENT } ;\n Verb = \":\" LITERAL ;\n\nThe syntax `*` matches a single URL path segment. The syntax `**` matches\nzero or more URL path segments, which must be the last part of the URL path\nexcept the `Verb`.\n\nThe syntax `Variable` matches part of the URL path as specified by its\ntemplate. A variable template must not contain other variables. If a variable\nmatches a single path segment, its template may be omitted, e.g. `{var}`\nis equivalent to `{var=*}`.\n\nThe syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`\ncontains any reserved character, such characters should be percent-encoded\nbefore the matching.\n\nIf a variable contains exactly one path segment, such as `\"{var}\"` or\n`\"{var=*}\"`, when such a variable is expanded into a URL path on the client\nside, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The\nserver side does the reverse decoding. Such variables show up in the\n[Discovery Document](https://developers.google.com/discovery/v1/reference/apis)\nas `{var}`.\n\nIf a variable contains multiple path segments, such as `\"{var=foo/*}\"`\nor `\"{var=**}\"`, when such a variable is expanded into a URL path on the\nclient side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.\nThe server side does the reverse decoding, except \"%2F\" and \"%2f\" are left\nunchanged. Such variables show up in the\n[Discovery Document](https://developers.google.com/discovery/v1/reference/apis)\nas `{+var}`.\n\n## Using gRPC API Service Configuration\n\ngRPC API Service Configuration (service config) is a configuration language\nfor configuring a gRPC service to become a user-facing product. The\nservice config is simply the YAML representation of the `google.api.Service`\nproto message.\n\nAs an alternative to annotating your proto file, you can configure gRPC\ntranscoding in your service config YAML files. You do this by specifying a\n`HttpRule` that maps the gRPC method to a REST endpoint, achieving the same\neffect as the proto annotation. This can be particularly useful if you\nhave a proto that is reused in multiple services. Note that any transcoding\nspecified in the service config will override any matching transcoding\nconfiguration in the proto.\n\nExample:\n\n http:\n rules:\n # Selects a gRPC method and applies HttpRule to it.\n - selector: example.v1.Messaging.GetMessage\n get: /v1/messages/{message_id}/{sub.subfield}\n\n## Special notes\n\nWhen gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the\nproto to JSON conversion must follow the [proto3\nspecification](https://developers.google.com/protocol-buffers/docs/proto3#json).\n\nWhile the single segment variable follows the semantics of\n[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String\nExpansion, the multi segment variable **does not** follow RFC 6570 Section\n3.2.3 Reserved Expansion. The reason is that the Reserved Expansion\ndoes not expand special characters like `?` and `#`, which would lead\nto invalid URLs. As the result, gRPC Transcoding uses a custom encoding\nfor multi segment variables.\n\nThe path variables **must not** refer to any repeated or mapped field,\nbecause client libraries are not capable of handling such variable expansion.\n\nThe path variables **must not** capture the leading \"/\" character. The reason\nis that the most common use case \"{var}\" does not capture the leading \"/\"\ncharacter. For consistency, all path variables must share the same behavior.\n\nRepeated message fields must not be mapped to URL query parameters, because\nno client library can support such complicated mapping.\n\nIf an API needs to use a JSON array for request or response body, it can map\nthe request or response body to a repeated field. However, some gRPC\nTranscoding implementations may not support this feature.", + "description": "`HttpRule` defines the mapping of an RPC method to one or more HTTP\nREST API methods. The mapping specifies how different portions of the RPC\nrequest message are mapped to URL path, URL query parameters, and\nHTTP request body. The mapping is typically specified as an\n`google.api.http` annotation on the RPC method,\nsee \"google/api/annotations.proto\" for details.\n\nThe mapping consists of a field specifying the path template and\nmethod kind. The path template can refer to fields in the request\nmessage, as in the example below which describes a REST GET\noperation on a resource collection of messages:\n\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http).get = \"/v1/messages/{message_id}/{sub.subfield}\";\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n SubMessage sub = 2; // `sub.subfield` is url-mapped\n }\n message Message {\n string text = 1; // content of the resource\n }\n\nThe same http annotation can alternatively be expressed inside the\n`GRPC API Configuration` YAML file.\n\n http:\n rules:\n - selector: \u003cproto_package_name\u003e.Messaging.GetMessage\n get: /v1/messages/{message_id}/{sub.subfield}\n\nThis definition enables an automatic, bidrectional mapping of HTTP\nJSON to RPC. Example:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456/foo` | `GetMessage(message_id: \"123456\" sub: SubMessage(subfield: \"foo\"))`\n\nIn general, not only fields but also field paths can be referenced\nfrom a path pattern. Fields mapped to the path pattern cannot be\nrepeated and must have a primitive (non-message) type.\n\nAny fields in the request message which are not bound by the path\npattern automatically become (optional) HTTP query\nparameters. Assume the following definition of the request message:\n\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http).get = \"/v1/messages/{message_id}\";\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n int64 revision = 2; // becomes a parameter\n SubMessage sub = 3; // `sub.subfield` becomes a parameter\n }\n\n\nThis enables a HTTP JSON to RPC mapping as below:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))`\n\nNote that fields which are mapped to HTTP parameters must have a\nprimitive type or a repeated primitive type. Message types are not\nallowed. In the case of a repeated type, the parameter can be\nrepeated in the URL, as in `...?param=A\u0026param=B`.\n\nFor HTTP method kinds which allow a request body, the `body` field\nspecifies the mapping. Consider a REST update method on the\nmessage resource collection:\n\n\n service Messaging {\n rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"message\"\n };\n }\n }\n message UpdateMessageRequest {\n string message_id = 1; // mapped to the URL\n Message message = 2; // mapped to the body\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled, where the\nrepresentation of the JSON in the request body is determined by\nprotos JSON encoding:\n\nHTTP | RPC\n-----|-----\n`PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n\nThe special name `*` can be used in the body mapping to define that\nevery field not bound by the path template should be mapped to the\nrequest body. This enables the following alternative definition of\nthe update method:\n\n service Messaging {\n rpc UpdateMessage(Message) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"*\"\n };\n }\n }\n message Message {\n string message_id = 1;\n string text = 2;\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled:\n\nHTTP | RPC\n-----|-----\n`PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n\nNote that when using `*` in the body mapping, it is not possible to\nhave HTTP parameters, as all fields not bound by the path end in\nthe body. This makes this option more rarely used in practice of\ndefining REST APIs. The common usage of `*` is in custom methods\nwhich don't use the URL at all for transferring data.\n\nIt is possible to define multiple HTTP methods for one RPC by using\nthe `additional_bindings` option. Example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/messages/{message_id}\"\n additional_bindings {\n get: \"/v1/users/{user_id}/messages/{message_id}\"\n }\n };\n }\n }\n message GetMessageRequest {\n string message_id = 1;\n string user_id = 2;\n }\n\n\nThis enables the following two alternative HTTP JSON to RPC\nmappings:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")`\n`GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")`\n\n# Rules for HTTP mapping\n\nThe rules for mapping HTTP path, query parameters, and body fields\nto the request message are as follows:\n\n1. The `body` field specifies either `*` or a field path, or is\n omitted. If omitted, it indicates there is no HTTP request body.\n2. Leaf fields (recursive expansion of nested messages in the\n request) can be classified into three types:\n (a) Matched in the URL template.\n (b) Covered by body (if body is `*`, everything except (a) fields;\n else everything under the body field)\n (c) All other fields.\n3. URL query parameters found in the HTTP request are mapped to (c) fields.\n4. Any body sent with an HTTP request can contain only (b) fields.\n\nThe syntax of the path template is as follows:\n\n Template = \"/\" Segments [ Verb ] ;\n Segments = Segment { \"/\" Segment } ;\n Segment = \"*\" | \"**\" | LITERAL | Variable ;\n Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n FieldPath = IDENT { \".\" IDENT } ;\n Verb = \":\" LITERAL ;\n\nThe syntax `*` matches a single path segment. The syntax `**` matches zero\nor more path segments, which must be the last part of the path except the\n`Verb`. The syntax `LITERAL` matches literal text in the path.\n\nThe syntax `Variable` matches part of the URL path as specified by its\ntemplate. A variable template must not contain other variables. If a variable\nmatches a single path segment, its template may be omitted, e.g. `{var}`\nis equivalent to `{var=*}`.\n\nIf a variable contains exactly one path segment, such as `\"{var}\"` or\n`\"{var=*}\"`, when such a variable is expanded into a URL path, all characters\nexcept `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the\nDiscovery Document as `{var}`.\n\nIf a variable contains one or more path segments, such as `\"{var=foo/*}\"`\nor `\"{var=**}\"`, when such a variable is expanded into a URL path, all\ncharacters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables\nshow up in the Discovery Document as `{+var}`.\n\nNOTE: While the single segment variable matches the semantics of\n[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2\nSimple String Expansion, the multi segment variable **does not** match\nRFC 6570 Reserved Expansion. The reason is that the Reserved Expansion\ndoes not expand special characters like `?` and `#`, which would lead\nto invalid URLs.\n\nNOTE: the field paths in variables and in the `body` must not refer to\nrepeated fields or map fields.", "id": "HttpRule", "properties": { "additionalBindings": { @@ -1300,8 +1315,15 @@ }, "type": "array" }, + "authorizations": { + "description": "Specifies the permission(s) required for an API element for the overall\nAPI request to succeed. It is typically used to mark request message fields\nthat contain the name of the resource and indicates the permissions that\nwill be checked on that resource.", + "items": { + "$ref": "AuthorizationRule" + }, + "type": "array" + }, "body": { - "description": "The name of the request field whose value is mapped to the HTTP request\nbody, or `*` for mapping all request fields not captured by the path\npattern to the HTTP body, or omitted for not having any HTTP request body.\n\nNOTE: the referred field must be present at the top-level of the request\nmessage type.", + "description": "The name of the request field whose value is mapped to the HTTP body, or\n`*` for mapping all fields not captured by the path pattern to the HTTP\nbody. NOTE: the referred field must not be a repeated field and must be\npresent at the top-level of request message type.", "type": "string" }, "custom": { @@ -1309,31 +1331,47 @@ "description": "The custom pattern is used for specifying an HTTP method that is not\nincluded in the `pattern` field, such as HEAD, or \"*\" to leave the\nHTTP method unspecified for this rule. The wild-card rule is useful\nfor services that provide content to Web (HTML) clients." }, "delete": { - "description": "Maps to HTTP DELETE. Used for deleting a resource.", + "description": "Used for deleting a resource.", "type": "string" }, "get": { - "description": "Maps to HTTP GET. Used for listing and getting information about\nresources.", + "description": "Used for listing and getting information about resources.", "type": "string" }, + "mediaDownload": { + "$ref": "MediaDownload", + "description": "Use this only for Scotty Requests. Do not use this for bytestream methods.\nFor media support, add instead [][google.bytestream.RestByteStream] as an\nAPI to your configuration." + }, + "mediaUpload": { + "$ref": "MediaUpload", + "description": "Use this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead\n[][google.bytestream.RestByteStream] as an API to your\nconfiguration for Bytestream methods." + }, "patch": { - "description": "Maps to HTTP PATCH. Used for updating a resource.", + "description": "Used for updating a resource.", "type": "string" }, "post": { - "description": "Maps to HTTP POST. Used for creating a resource or performing an action.", + "description": "Used for creating a resource.", "type": "string" }, "put": { - "description": "Maps to HTTP PUT. Used for replacing a resource.", + "description": "Used for updating a resource.", "type": "string" }, "responseBody": { - "description": "Optional. The name of the response field whose value is mapped to the HTTP\nresponse body. When omitted, the entire response message will be used\nas the HTTP response body.\n\nNOTE: The referred field must be present at the top-level of the response\nmessage type.", + "description": "Optional. The name of the response field whose value is mapped to the HTTP\nbody of response. Other response fields are ignored. When\nnot set, the response message will be used as HTTP body of response.", + "type": "string" + }, + "restCollection": { + "description": "DO NOT USE. This is an experimental field.\n\nOptional. The REST collection name is by default derived from the URL\npattern. If specified, this field overrides the default collection name.\nExample:\n\n rpc AddressesAggregatedList(AddressesAggregatedListRequest)\n returns (AddressesAggregatedListResponse) {\n option (google.api.http) = {\n get: \"/v1/projects/{project_id}/aggregated/addresses\"\n rest_collection: \"projects.addresses\"\n };\n }\n\nThis method has the automatically derived collection name\n\"projects.aggregated\". Because, semantically, this rpc is actually an\noperation on the \"projects.addresses\" collection, the `rest_collection`\nfield is configured to override the derived collection name.", + "type": "string" + }, + "restMethodName": { + "description": "DO NOT USE. This is an experimental field.\n\nOptional. The rest method name is by default derived from the URL\npattern. If specified, this field overrides the default method name.\nExample:\n\n rpc CreateResource(CreateResourceRequest)\n returns (CreateResourceResponse) {\n option (google.api.http) = {\n post: \"/v1/resources\",\n body: \"resource\",\n rest_method_name: \"insert\"\n };\n }\n\nThis method has the automatically derived rest method name\n\"create\", but for backwards compatibility with apiary, it is specified as\ninsert.", "type": "string" }, "selector": { - "description": "Selects a method to which this rule applies.\n\nRefer to selector for syntax details.", + "description": "Selects methods to which this rule applies.\n\nRefer to selector for syntax details.", "type": "string" } }, @@ -1469,6 +1507,81 @@ }, "type": "object" }, + "MediaDownload": { + "description": "Defines the Media configuration for a service in case of a download.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods.", + "id": "MediaDownload", + "properties": { + "completeNotification": { + "description": "A boolean that determines whether a notification for the completion of a\ndownload should be sent to the backend.", + "type": "boolean" + }, + "downloadService": { + "description": "DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.\n\nSpecify name of the download service if one is used for download.", + "type": "string" + }, + "dropzone": { + "description": "Name of the Scotty dropzone to use for the current API.", + "type": "string" + }, + "enabled": { + "description": "Whether download is enabled.", + "type": "boolean" + }, + "maxDirectDownloadSize": { + "description": "Optional maximum acceptable size for direct download.\nThe size is specified in bytes.", + "format": "int64", + "type": "string" + }, + "useDirectDownload": { + "description": "A boolean that determines if direct download from ESF should be used for\ndownload of this media.", + "type": "boolean" + } + }, + "type": "object" + }, + "MediaUpload": { + "description": "Defines the Media configuration for a service in case of an upload.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods.", + "id": "MediaUpload", + "properties": { + "completeNotification": { + "description": "A boolean that determines whether a notification for the completion of an\nupload should be sent to the backend. These notifications will not be seen\nby the client and will not consume quota.", + "type": "boolean" + }, + "dropzone": { + "description": "Name of the Scotty dropzone to use for the current API.", + "type": "string" + }, + "enabled": { + "description": "Whether upload is enabled.", + "type": "boolean" + }, + "maxSize": { + "description": "Optional maximum acceptable size for an upload.\nThe size is specified in bytes.", + "format": "int64", + "type": "string" + }, + "mimeTypes": { + "description": "An array of mimetype patterns. Esf will only accept uploads that match one\nof the given patterns.", + "items": { + "type": "string" + }, + "type": "array" + }, + "progressNotification": { + "description": "Whether to receive a notification for progress changes of media upload.", + "type": "boolean" + }, + "startNotification": { + "description": "Whether to receive a notification on the start of media upload.", + "type": "boolean" + }, + "uploadService": { + "description": "DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.\n\nSpecify name of the upload service if one is used for upload.", + "type": "string" + } + }, + "type": "object" + }, "Method": { "description": "Method represents a method of an API interface.", "id": "Method", @@ -1833,7 +1946,7 @@ "type": "object" }, "Quota": { - "description": "Quota configuration helps to achieve fairness and budgeting in service\nusage.\n\nThe quota configuration works this way:\n- The service configuration defines a set of metrics.\n- For API calls, the quota.metric_rules maps methods to metrics with\n corresponding costs.\n- The quota.limits defines limits on the metrics, which will be used for\n quota checks at runtime.\n\nAn example quota configuration in yaml format:\n\n quota:\n limits:\n\n - name: apiWriteQpsPerProject\n metric: library.googleapis.com/write_calls\n unit: \"1/min/{project}\" # rate limit for consumer projects\n values:\n STANDARD: 10000\n\n\n # The metric rules bind all methods to the read_calls metric,\n # except for the UpdateBook and DeleteBook methods. These two methods\n # are mapped to the write_calls metric, with the UpdateBook method\n # consuming at twice rate as the DeleteBook method.\n metric_rules:\n - selector: \"*\"\n metric_costs:\n library.googleapis.com/read_calls: 1\n - selector: google.example.library.v1.LibraryService.UpdateBook\n metric_costs:\n library.googleapis.com/write_calls: 2\n - selector: google.example.library.v1.LibraryService.DeleteBook\n metric_costs:\n library.googleapis.com/write_calls: 1\n\n Corresponding Metric definition:\n\n metrics:\n - name: library.googleapis.com/read_calls\n display_name: Read requests\n metric_kind: DELTA\n value_type: INT64\n\n - name: library.googleapis.com/write_calls\n display_name: Write requests\n metric_kind: DELTA\n value_type: INT64", + "description": "Quota configuration helps to achieve fairness and budgeting in service\nusage.\n\nThe quota configuration works this way:\n- The service configuration defines a set of metrics.\n- For API calls, the quota.metric_rules maps methods to metrics with\n corresponding costs.\n- The quota.limits defines limits on the metrics, which will be used for\n quota checks at runtime.\n\nAn example quota configuration in yaml format:\n\n quota:\n\n - name: apiWriteQpsPerProject\n metric: library.googleapis.com/write_calls\n unit: \"1/min/{project}\" # rate limit for consumer projects\n values:\n STANDARD: 10000\n\n\n # The metric rules bind all methods to the read_calls metric,\n # except for the UpdateBook and DeleteBook methods. These two methods\n # are mapped to the write_calls metric, with the UpdateBook method\n # consuming at twice rate as the DeleteBook method.\n metric_rules:\n - selector: \"*\"\n metric_costs:\n library.googleapis.com/read_calls: 1\n - selector: google.example.library.v1.LibraryService.UpdateBook\n metric_costs:\n library.googleapis.com/write_calls: 2\n - selector: google.example.library.v1.LibraryService.DeleteBook\n metric_costs:\n library.googleapis.com/write_calls: 1\n\n Corresponding Metric definition:\n\n metrics:\n - name: library.googleapis.com/read_calls\n display_name: Read requests\n metric_kind: DELTA\n value_type: INT64\n\n - name: library.googleapis.com/write_calls\n display_name: Write requests\n metric_kind: DELTA\n value_type: INT64", "id": "Quota", "properties": { "limits": { diff --git a/vendor/google.golang.org/api/serviceusage/v1beta1/serviceusage-gen.go b/vendor/google.golang.org/api/serviceusage/v1beta1/serviceusage-gen.go index fc37ccb0..006fdb38 100644 --- a/vendor/google.golang.org/api/serviceusage/v1beta1/serviceusage-gen.go +++ b/vendor/google.golang.org/api/serviceusage/v1beta1/serviceusage-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -497,6 +496,68 @@ func (s *AuthorizationConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AuthorizationRule: Authorization rule for API services. +// +// It specifies the permission(s) required for an API element for the +// overall +// API request to succeed. It is typically used to mark request message +// fields +// that contain the name of the resource and indicates the permissions +// that +// will be checked on that resource. +// +// For example: +// +// package google.storage.v1; +// +// message CopyObjectRequest { +// string source = 1 [ +// (google.api.authz).permissions = "storage.objects.get"]; +// +// string destination = 2 [ +// (google.api.authz).permissions = +// "storage.objects.create,storage.objects.update"]; +// } +type AuthorizationRule struct { + // Permissions: The required permissions. The acceptable values vary + // depend on the + // authorization system used. For Google APIs, it should be a + // comma-separated + // Google IAM permission values. When multiple permissions are listed, + // the + // semantics is not defined by the system. Additional documentation + // must + // be provided manually. + Permissions string `json:"permissions,omitempty"` + + // Selector: Selects the API elements to which this rule applies. + // + // Refer to selector for syntax details. + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") 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 *AuthorizationRule) MarshalJSON() ([]byte, error) { + type NoMethod AuthorizationRule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Backend: `Backend` defines the backend configuration for a service. type Backend struct { // Rules: A list of API backend rules that apply to individual API @@ -2010,119 +2071,114 @@ func (s *Http) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpRule: # gRPC Transcoding +// HttpRule: `HttpRule` defines the mapping of an RPC method to one or +// more HTTP +// REST API methods. The mapping specifies how different portions of the +// RPC +// request message are mapped to URL path, URL query parameters, +// and +// HTTP request body. The mapping is typically specified as +// an +// `google.api.http` annotation on the RPC method, +// see "google/api/annotations.proto" for details. // -// gRPC Transcoding is a feature for mapping between a gRPC method and -// one or -// more HTTP REST endpoints. It allows developers to build a single API -// service -// that supports both gRPC APIs and REST APIs. Many systems, including -// [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), -// [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this -// feature -// and use it for large scale production services. +// The mapping consists of a field specifying the path template +// and +// method kind. The path template can refer to fields in the +// request +// message, as in the example below which describes a REST GET +// operation on a resource collection of messages: // -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping -// specifies -// how different portions of the gRPC request message are mapped to the -// URL -// path, URL query parameters, and HTTP request body. It also controls -// how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` -// is -// typically specified as an `google.api.http` annotation on the gRPC -// method. -// -// Each mapping specifies a URL path template and an HTTP method. The -// path -// template may refer to one or more fields in the gRPC request message, -// as long -// as each field is a non-repeated field with a primitive (non-message) -// type. -// The path template controls how fields of the request message are -// mapped to -// the URL path. -// -// Example: // // service Messaging { // rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: -// "messages/123456")` -// -// Any fields in the request message which are not bound by the path -// template -// automatically become HTTP query parameters if there is no HTTP -// request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; +// option (google.api.http).get = +// "/v1/messages/{message_id}/{sub.subfield}"; // } // } // message GetMessageRequest { // message SubMessage { // string subfield = 1; // } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter -// `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter -// `sub.subfield`. +// string message_id = 1; // mapped to the URL +// SubMessage sub = 2; // `sub.subfield` is url-mapped // } +// message Message { +// string text = 1; // content of the resource +// } +// +// The same http annotation can alternatively be expressed inside +// the +// `GRPC API Configuration` YAML file. +// +// http: +// rules: +// - selector: .Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// This definition enables an automatic, bidrectional mapping of +// HTTP +// JSON to RPC. Example: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" +// sub: SubMessage(subfield: "foo"))` +// +// In general, not only fields but also field paths can be +// referenced +// from a path pattern. Fields mapped to the path pattern cannot +// be +// repeated and must have a primitive (non-message) type. +// +// Any fields in the request message which are not bound by the +// path +// pattern automatically become (optional) HTTP query +// parameters. Assume the following definition of the request +// message: +// +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http).get = "/v1/messages/{message_id}"; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // mapped to the URL +// int64 revision = 2; // becomes a parameter +// SubMessage sub = 3; // `sub.subfield` becomes a parameter +// } +// // // This enables a HTTP JSON to RPC mapping as below: // -// HTTP | gRPC +// HTTP | RPC // -----|----- // `GET /v1/messages/123456?revision=2&sub.subfield=foo` | // `GetMessage(message_id: "123456" revision: 2 sub: // SubMessage(subfield: "foo"))` // -// Note that fields which are mapped to URL query parameters must have +// Note that fields which are mapped to HTTP parameters must have // a -// primitive type or a repeated primitive type or a non-repeated message -// type. -// In the case of a repeated type, the parameter can be repeated in the -// URL -// as `...?param=A¶m=B`. In the case of a message type, each field -// of the -// message is mapped to a separate parameter, such -// as -// `...?foo.a=A&foo.b=B&foo.c=C`. +// primitive type or a repeated primitive type. Message types are +// not +// allowed. In the case of a repeated type, the parameter can +// be +// repeated in the URL, as in `...?param=A¶m=B`. // -// For HTTP methods that allow a request body, the `body` +// For HTTP method kinds which allow a request body, the `body` // field // specifies the mapping. Consider a REST update method on the // message resource collection: // +// // service Messaging { // rpc UpdateMessage(UpdateMessageRequest) returns (Message) { // option (google.api.http) = { -// patch: "/v1/messages/{message_id}" +// put: "/v1/messages/{message_id}" // body: "message" // }; // } @@ -2132,15 +2188,16 @@ func (s *Http) MarshalJSON() ([]byte, error) { // Message message = 2; // mapped to the body // } // +// // The following HTTP JSON to RPC mapping is enabled, where // the // representation of the JSON in the request body is determined // by // protos JSON encoding: // -// HTTP | gRPC +// HTTP | RPC // -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | +// `PUT /v1/messages/123456 { "text": "Hi!" }` | // `UpdateMessage(message_id: "123456" message { text: "Hi!" })` // // The special name `*` can be used in the body mapping to define @@ -2154,7 +2211,7 @@ func (s *Http) MarshalJSON() ([]byte, error) { // service Messaging { // rpc UpdateMessage(Message) returns (Message) { // option (google.api.http) = { -// patch: "/v1/messages/{message_id}" +// put: "/v1/messages/{message_id}" // body: "*" // }; // } @@ -2167,16 +2224,16 @@ func (s *Http) MarshalJSON() ([]byte, error) { // // The following HTTP JSON to RPC mapping is enabled: // -// HTTP | gRPC +// HTTP | RPC // -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | +// `PUT /v1/messages/123456 { "text": "Hi!" }` | // `UpdateMessage(message_id: "123456" text: "Hi!")` // // Note that when using `*` in the body mapping, it is not possible // to // have HTTP parameters, as all fields not bound by the path end in // the body. This makes this option more rarely used in practice -// when +// of // defining REST APIs. The common usage of `*` is in custom // methods // which don't use the URL at all for transferring data. @@ -2200,39 +2257,38 @@ func (s *Http) MarshalJSON() ([]byte, error) { // string user_id = 2; // } // -// This enables the following two alternative HTTP JSON to RPC +// +// This enables the following two alternative HTTP JSON to +// RPC // mappings: // -// HTTP | gRPC +// HTTP | RPC // -----|----- // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` // `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" // message_id: "123456")` // -// ## Rules for HTTP mapping +// # Rules for HTTP mapping // -// 1. Leaf request fields (recursive expansion nested messages in the -// request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the -// URL path. -// - Fields referred by the HttpRule.body. They are passed via the -// HTTP -// request body. -// - All other fields are passed via the URL query parameters, and -// the -// parameter name is the field path in the request message. A -// repeated -// field can be represented as multiple query parameters under the -// same -// name. -// 2. If HttpRule.body is "*", there is no URL query parameter, all -// fields -// are passed via URL path and HTTP request body. -// 3. If HttpRule.body is omitted, there is no HTTP request body, all -// fields are passed via URL path and URL query parameters. +// The rules for mapping HTTP path, query parameters, and body fields +// to the request message are as follows: // -// ### Path template syntax +// 1. The `body` field specifies either `*` or a field path, or is +// omitted. If omitted, it indicates there is no HTTP request +// body. +// 2. Leaf fields (recursive expansion of nested messages in the +// request) can be classified into three types: +// (a) Matched in the URL template. +// (b) Covered by body (if body is `*`, everything except (a) +// fields; +// else everything under the body field) +// (c) All other fields. +// 3. URL query parameters found in the HTTP request are mapped to (c) +// fields. +// 4. Any body sent with an HTTP request can contain only (b) +// fields. +// +// The syntax of the path template is as follows: // // Template = "/" Segments [ Verb ] ; // Segments = Segment { "/" Segment } ; @@ -2241,11 +2297,11 @@ func (s *Http) MarshalJSON() ([]byte, error) { // FieldPath = IDENT { "." IDENT } ; // Verb = ":" LITERAL ; // -// The syntax `*` matches a single URL path segment. The syntax `**` -// matches -// zero or more URL path segments, which must be the last part of the -// URL path -// except the `Verb`. +// The syntax `*` matches a single path segment. The syntax `**` matches +// zero +// or more path segments, which must be the last part of the path except +// the +// `Verb`. The syntax `LITERAL` matches literal text in the path. // // The syntax `Variable` matches part of the URL path as specified by // its @@ -2255,114 +2311,35 @@ func (s *Http) MarshalJSON() ([]byte, error) { // `{var}` // is equivalent to `{var=*}`. // -// The syntax `LITERAL` matches literal text in the URL path. If the -// `LITERAL` -// contains any reserved character, such characters should be -// percent-encoded -// before the matching. -// // If a variable contains exactly one path segment, such as "{var}" // or -// "{var=*}", when such a variable is expanded into a URL path on the -// client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. -// The -// server side does the reverse decoding. Such variables show up in -// the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) -// a -// s `{var}`. +// "{var=*}", when such a variable is expanded into a URL path, all +// characters +// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up +// in the +// Discovery Document as `{var}`. // -// If a variable contains multiple path segments, such as +// If a variable contains one or more path segments, such as // "{var=foo/*}" -// or "{var=**}", when such a variable is expanded into a URL path on -// the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are -// percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are -// left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) -// a -// s `{+var}`. +// or "{var=**}", when such a variable is expanded into a URL path, +// all +// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such +// variables +// show up in the Discovery Document as `{+var}`. // -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration -// language -// for configuring a gRPC service to become a user-facing product. -// The -// service config is simply the YAML representation of the -// `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure -// gRPC -// transcoding in your service config YAML files. You do this by -// specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving -// the same -// effect as the proto annotation. This can be particularly useful if -// you -// have a proto that is reused in multiple services. Note that any -// transcoding -// specified in the service config will override any matching -// transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, -// the -// proto to JSON conversion must follow the -// [proto3 -// specification](https://developers.google.com/protocol-buffers/ -// docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple -// String -// Expansion, the multi segment variable **does not** follow RFC 6570 -// Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved +// NOTE: While the single segment variable matches the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 +// Simple String Expansion, the multi segment variable **does not** +// match +// RFC 6570 Reserved Expansion. The reason is that the Reserved // Expansion // does not expand special characters like `?` and `#`, which would // lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom -// encoding -// for multi segment variables. +// to invalid URLs. // -// The path variables **must not** refer to any repeated or mapped -// field, -// because client libraries are not capable of handling such variable -// expansion. -// -// The path variables **must not** capture the leading "/" character. -// The reason -// is that the most common use case "{var}" does not capture the leading -// "/" -// character. For consistency, all path variables must share the same -// behavior. -// -// Repeated message fields must not be mapped to URL query parameters, -// because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it -// can map -// the request or response body to a repeated field. However, some -// gRPC -// Transcoding implementations may not support this feature. +// NOTE: the field paths in variables and in the `body` must not refer +// to +// repeated fields or map fields. type HttpRule struct { // AdditionalBindings: Additional HTTP bindings for the selector. Nested // bindings must @@ -2370,16 +2347,22 @@ type HttpRule struct { // the nesting may only be one level deep). AdditionalBindings []*HttpRule `json:"additionalBindings,omitempty"` + // Authorizations: Specifies the permission(s) required for an API + // element for the overall + // API request to succeed. It is typically used to mark request message + // fields + // that contain the name of the resource and indicates the permissions + // that + // will be checked on that resource. + Authorizations []*AuthorizationRule `json:"authorizations,omitempty"` + // Body: The name of the request field whose value is mapped to the HTTP - // request - // body, or `*` for mapping all request fields not captured by the - // path - // pattern to the HTTP body, or omitted for not having any HTTP request - // body. - // - // NOTE: the referred field must be present at the top-level of the - // request - // message type. + // body, or + // `*` for mapping all fields not captured by the path pattern to the + // HTTP + // body. NOTE: the referred field must not be a repeated field and must + // be + // present at the top-level of request message type. Body string `json:"body,omitempty"` // Custom: The custom pattern is used for specifying an HTTP method that @@ -2391,36 +2374,90 @@ type HttpRule struct { // for services that provide content to Web (HTML) clients. Custom *CustomHttpPattern `json:"custom,omitempty"` - // Delete: Maps to HTTP DELETE. Used for deleting a resource. + // Delete: Used for deleting a resource. Delete string `json:"delete,omitempty"` - // Get: Maps to HTTP GET. Used for listing and getting information - // about - // resources. + // Get: Used for listing and getting information about resources. Get string `json:"get,omitempty"` - // Patch: Maps to HTTP PATCH. Used for updating a resource. + // MediaDownload: Use this only for Scotty Requests. Do not use this for + // bytestream methods. + // For media support, add instead [][google.bytestream.RestByteStream] + // as an + // API to your configuration. + MediaDownload *MediaDownload `json:"mediaDownload,omitempty"` + + // MediaUpload: Use this only for Scotty Requests. Do not use this for + // media support using + // Bytestream, add instead + // [][google.bytestream.RestByteStream] as an API to your + // configuration for Bytestream methods. + MediaUpload *MediaUpload `json:"mediaUpload,omitempty"` + + // Patch: Used for updating a resource. Patch string `json:"patch,omitempty"` - // Post: Maps to HTTP POST. Used for creating a resource or performing - // an action. + // Post: Used for creating a resource. Post string `json:"post,omitempty"` - // Put: Maps to HTTP PUT. Used for replacing a resource. + // Put: Used for updating a resource. Put string `json:"put,omitempty"` // ResponseBody: Optional. The name of the response field whose value is // mapped to the HTTP - // response body. When omitted, the entire response message will be - // used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the - // response - // message type. + // body of response. Other response fields are ignored. When + // not set, the response message will be used as HTTP body of response. ResponseBody string `json:"responseBody,omitempty"` - // Selector: Selects a method to which this rule applies. + // RestCollection: DO NOT USE. This is an experimental field. + // + // Optional. The REST collection name is by default derived from the + // URL + // pattern. If specified, this field overrides the default collection + // name. + // Example: + // + // rpc AddressesAggregatedList(AddressesAggregatedListRequest) + // returns (AddressesAggregatedListResponse) { + // option (google.api.http) = { + // get: "/v1/projects/{project_id}/aggregated/addresses" + // rest_collection: "projects.addresses" + // }; + // } + // + // This method has the automatically derived collection + // name + // "projects.aggregated". Because, semantically, this rpc is actually + // an + // operation on the "projects.addresses" collection, the + // `rest_collection` + // field is configured to override the derived collection name. + RestCollection string `json:"restCollection,omitempty"` + + // RestMethodName: DO NOT USE. This is an experimental field. + // + // Optional. The rest method name is by default derived from the + // URL + // pattern. If specified, this field overrides the default method + // name. + // Example: + // + // rpc CreateResource(CreateResourceRequest) + // returns (CreateResourceResponse) { + // option (google.api.http) = { + // post: "/v1/resources", + // body: "resource", + // rest_method_name: "insert" + // }; + // } + // + // This method has the automatically derived rest method name + // "create", but for backwards compatibility with apiary, it is + // specified as + // insert. + RestMethodName string `json:"restMethodName,omitempty"` + + // Selector: Selects methods to which this rule applies. // // Refer to selector for syntax details. Selector string `json:"selector,omitempty"` @@ -2734,6 +2771,135 @@ func (s *LoggingDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MediaDownload: Defines the Media configuration for a service in case +// of a download. +// Use this only for Scotty Requests. Do not use this for media support +// using +// Bytestream, add instead [][google.bytestream.RestByteStream] as an +// API to +// your configuration for Bytestream methods. +type MediaDownload struct { + // CompleteNotification: A boolean that determines whether a + // notification for the completion of a + // download should be sent to the backend. + CompleteNotification bool `json:"completeNotification,omitempty"` + + // DownloadService: DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING + // IS REMOVED. + // + // Specify name of the download service if one is used for download. + DownloadService string `json:"downloadService,omitempty"` + + // Dropzone: Name of the Scotty dropzone to use for the current API. + Dropzone string `json:"dropzone,omitempty"` + + // Enabled: Whether download is enabled. + Enabled bool `json:"enabled,omitempty"` + + // MaxDirectDownloadSize: Optional maximum acceptable size for direct + // download. + // The size is specified in bytes. + MaxDirectDownloadSize int64 `json:"maxDirectDownloadSize,omitempty,string"` + + // UseDirectDownload: A boolean that determines if direct download from + // ESF should be used for + // download of this media. + UseDirectDownload bool `json:"useDirectDownload,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CompleteNotification") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteNotification") 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 *MediaDownload) MarshalJSON() ([]byte, error) { + type NoMethod MediaDownload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MediaUpload: Defines the Media configuration for a service in case of +// an upload. +// Use this only for Scotty Requests. Do not use this for media support +// using +// Bytestream, add instead [][google.bytestream.RestByteStream] as an +// API to +// your configuration for Bytestream methods. +type MediaUpload struct { + // CompleteNotification: A boolean that determines whether a + // notification for the completion of an + // upload should be sent to the backend. These notifications will not be + // seen + // by the client and will not consume quota. + CompleteNotification bool `json:"completeNotification,omitempty"` + + // Dropzone: Name of the Scotty dropzone to use for the current API. + Dropzone string `json:"dropzone,omitempty"` + + // Enabled: Whether upload is enabled. + Enabled bool `json:"enabled,omitempty"` + + // MaxSize: Optional maximum acceptable size for an upload. + // The size is specified in bytes. + MaxSize int64 `json:"maxSize,omitempty,string"` + + // MimeTypes: An array of mimetype patterns. Esf will only accept + // uploads that match one + // of the given patterns. + MimeTypes []string `json:"mimeTypes,omitempty"` + + // ProgressNotification: Whether to receive a notification for progress + // changes of media upload. + ProgressNotification bool `json:"progressNotification,omitempty"` + + // StartNotification: Whether to receive a notification on the start of + // media upload. + StartNotification bool `json:"startNotification,omitempty"` + + // UploadService: DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING + // IS REMOVED. + // + // Specify name of the upload service if one is used for upload. + UploadService string `json:"uploadService,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CompleteNotification") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompleteNotification") 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 *MediaUpload) MarshalJSON() ([]byte, error) { + type NoMethod MediaUpload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Method: Method represents a method of an API interface. type Method struct { // Name: The simple name of this method. @@ -3706,7 +3872,6 @@ func (s *Page) MarshalJSON() ([]byte, error) { // An example quota configuration in yaml format: // // quota: -// limits: // // - name: apiWriteQpsPerProject // metric: library.googleapis.com/write_calls @@ -4625,13 +4790,9 @@ func (c *OperationsGetCall) 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4811,13 +4972,9 @@ func (c *OperationsListCall) 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, "v1beta1/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -4983,13 +5140,9 @@ func (c *ServicesBatchEnableCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/services:batchEnable") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -5135,13 +5288,9 @@ func (c *ServicesDisableCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:disable") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5278,13 +5427,9 @@ func (c *ServicesEnableCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:enable") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5426,13 +5571,9 @@ func (c *ServicesGetCall) 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, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -5606,13 +5747,9 @@ func (c *ServicesListCall) 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, "v1beta1/{+parent}/services") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, diff --git a/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-gen.go b/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-gen.go index 2dd8c73c..f22ca1e7 100644 --- a/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-gen.go +++ b/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -997,13 +996,9 @@ func (c *ProjectsGetConfigCall) 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, "v1/{+name}/config") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1134,13 +1129,9 @@ func (c *ProjectsUpdateConfigCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/config") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1277,13 +1268,9 @@ func (c *ProjectsReposCreateCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/repos") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -1410,13 +1397,9 @@ func (c *ProjectsReposDeleteCall) doRequest(alt string) (*http.Response, error) reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1554,13 +1537,9 @@ func (c *ProjectsReposGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -1703,13 +1682,9 @@ func (c *ProjectsReposGetIamPolicyCall) 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, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -1868,13 +1843,9 @@ func (c *ProjectsReposListCall) 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, "v1/{+name}/repos") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2039,13 +2010,9 @@ func (c *ProjectsReposPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -2180,13 +2147,9 @@ func (c *ProjectsReposSetIamPolicyCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -2324,13 +2287,9 @@ func (c *ProjectsReposTestIamPermissionsCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, diff --git a/vendor/google.golang.org/api/spanner/v1/spanner-api.json b/vendor/google.golang.org/api/spanner/v1/spanner-api.json index f7a91b5a..270db1f7 100644 --- a/vendor/google.golang.org/api/spanner/v1/spanner-api.json +++ b/vendor/google.golang.org/api/spanner/v1/spanner-api.json @@ -532,7 +532,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a database resource.\nReturns an empty policy if a database exists but does\nnot have a policy set.\n\nAuthorization requires `spanner.databases.getIamPolicy` permission on\nresource.", + "description": "Gets the access control policy for a database resource. Returns an empty\npolicy if a database exists but does not have a policy set.\n\nAuthorization requires `spanner.databases.getIamPolicy` permission on\nresource.", "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:getIamPolicy", "httpMethod": "POST", "id": "spanner.projects.instances.databases.getIamPolicy", @@ -598,7 +598,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on a database resource.\nReplaces any existing policy.\n\nAuthorization requires `spanner.databases.setIamPolicy`\npermission on resource.", + "description": "Sets the access control policy on a database resource. Replaces any\nexisting policy.\n\nAuthorization requires `spanner.databases.setIamPolicy` permission on\nresource.", "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:setIamPolicy", "httpMethod": "POST", "id": "spanner.projects.instances.databases.setIamPolicy", @@ -627,7 +627,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that the caller has on the specified database resource.\n\nAttempting this RPC on a non-existent Cloud Spanner database will\nresult in a NOT_FOUND error if the user has\n`spanner.databases.list` permission on the containing Cloud\nSpanner instance. Otherwise returns an empty set of permissions.", + "description": "Returns permissions that the caller has on the specified database resource.\n\nAttempting this RPC on a non-existent Cloud Spanner database will result in\na NOT_FOUND error if the user has `spanner.databases.list` permission on\nthe containing Cloud Spanner instance. Otherwise returns an empty set of\npermissions.", "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:testIamPermissions", "httpMethod": "POST", "id": "spanner.projects.instances.databases.testIamPermissions", @@ -1052,7 +1052,7 @@ ] }, "partitionQuery": { - "description": "Creates a set of partition tokens that can be used to execute a query\noperation in parallel. Each of the returned partition tokens can be used\nby ExecuteStreamingSql to specify a subset\nof the query result to read. The same session and read-only transaction\nmust be used by the PartitionQueryRequest used to create the\npartition tokens and the ExecuteSqlRequests that use the partition tokens.\n\nPartition tokens become invalid when the session used to create them\nis deleted, is idle for too long, begins a new transaction, or becomes too\nold. When any of these happen, it is not possible to resume the query, and\nthe whole operation must be restarted from the beginning.", + "description": "Creates a set of partition tokens that can be used to execute a query\noperation in parallel. Each of the returned partition tokens can be used\nby ExecuteStreamingSql to specify a subset\nof the query result to read. The same session and read-only transaction\nmust be used by the PartitionQueryRequest used to create the\npartition tokens and the ExecuteSqlRequests that use the partition tokens.\nPartition tokens become invalid when the session used to create them\nis deleted or begins a new transaction.", "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:partitionQuery", "httpMethod": "POST", "id": "spanner.projects.instances.databases.sessions.partitionQuery", @@ -1081,7 +1081,7 @@ ] }, "partitionRead": { - "description": "Creates a set of partition tokens that can be used to execute a read\noperation in parallel. Each of the returned partition tokens can be used\nby StreamingRead to specify a subset of the read\nresult to read. The same session and read-only transaction must be used by\nthe PartitionReadRequest used to create the partition tokens and the\nReadRequests that use the partition tokens. There are no ordering\nguarantees on rows returned among the returned partition tokens, or even\nwithin each individual StreamingRead call issued with a partition_token.\n\nPartition tokens become invalid when the session used to create them\nis deleted, is idle for too long, begins a new transaction, or becomes too\nold. When any of these happen, it is not possible to resume the read, and\nthe whole operation must be restarted from the beginning.", + "description": "Creates a set of partition tokens that can be used to execute a read\noperation in parallel. Each of the returned partition tokens can be used\nby StreamingRead to specify a subset of the read\nresult to read. The same session and read-only transaction must be used by\nthe PartitionReadRequest used to create the partition tokens and the\nReadRequests that use the partition tokens.\nPartition tokens become invalid when the session used to create them\nis deleted or begins a new transaction.", "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:partitionRead", "httpMethod": "POST", "id": "spanner.projects.instances.databases.sessions.partitionRead", @@ -1329,7 +1329,7 @@ } } }, - "revision": "20180920", + "revision": "20180625", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "BeginTransactionRequest": { @@ -1347,10 +1347,6 @@ "description": "Associates `members` with a `role`.", "id": "Binding", "properties": { - "condition": { - "$ref": "Expr", - "description": "Unimplemented. The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently." - }, "members": { "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { @@ -1359,7 +1355,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", "type": "string" } }, @@ -1590,41 +1586,13 @@ "format": "byte", "type": "string" }, - "seqno": { - "description": "A per-transaction sequence number used to identify this request. This\nmakes each request idempotent such that if the request is received multiple\ntimes, at most one will succeed.\n\nThe sequence number must be monotonically increasing within the\ntransaction. If a request arrives for the first time with an out-of-order\nsequence number, the transaction may be aborted. Replays of previously\nhandled requests will yield the same response as the first execution.\n\nRequired for DML statements. Ignored for queries.", - "format": "int64", - "type": "string" - }, "sql": { "description": "Required. The SQL string.", "type": "string" }, "transaction": { "$ref": "TransactionSelector", - "description": "The transaction to use. If none is provided, the default is a\ntemporary read-only transaction with strong concurrency.\n\nThe transaction to use.\n\nFor queries, if none is provided, the default is a temporary read-only\ntransaction with strong concurrency.\n\nStandard DML statements require a ReadWrite transaction. Single-use\ntransactions are not supported (to avoid replay). The caller must\neither supply an existing transaction ID or begin a new transaction.\n\nPartitioned DML requires an existing PartitionedDml transaction ID." - } - }, - "type": "object" - }, - "Expr": { - "description": "Represents an expression text. Example:\n\n title: \"User account presence\"\n description: \"Determines whether the request has a user account\"\n expression: \"size(request.user) \u003e 0\"", - "id": "Expr", - "properties": { - "description": { - "description": "An optional description of the expression. This is a longer text which\ndescribes the expression, e.g. when hovered over it in a UI.", - "type": "string" - }, - "expression": { - "description": "Textual representation of an expression in\nCommon Expression Language syntax.\n\nThe application context of the containing message determines which\nwell-known feature set of CEL is supported.", - "type": "string" - }, - "location": { - "description": "An optional string indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.", - "type": "string" - }, - "title": { - "description": "An optional title for the expression, i.e. a short string describing\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.", - "type": "string" + "description": "The transaction to use. If none is provided, the default is a\ntemporary read-only transaction with strong concurrency." } }, "type": "object" @@ -1958,7 +1926,7 @@ }, "stats": { "$ref": "ResultSetStats", - "description": "Query plan and execution statistics for the statement that produced this\nstreaming result set. These can be requested by setting\nExecuteSqlRequest.query_mode and are sent\nonly once with the last response in the stream.\nThis field will also be present in the last response for DML\nstatements." + "description": "Query plan and execution statistics for the statement that produced this\nstreaming result set. These can be requested by setting\nExecuteSqlRequest.query_mode and are sent\nonly once with the last response in the stream." }, "values": { "description": "A streamed result set consists of a stream of values, which might\nbe split into many `PartialResultSet` messages to accommodate\nlarge rows and/or large values. Every N complete values defines a\nrow, where N is equal to the number of entries in\nmetadata.row_type.fields.\n\nMost values are encoded based on type as described\nhere.\n\nIt is possible that the last value in values is \"chunked\",\nmeaning that the rest of the value is sent in subsequent\n`PartialResultSet`(s). This is denoted by the chunked_value\nfield. Two or more chunked values can be merged to form a\ncomplete value as follows:\n\n * `bool/number/null`: cannot be chunked\n * `string`: concatenate the strings\n * `list`: concatenate the lists. If the last element in a list is a\n `string`, `list`, or `object`, merge it with the first element in\n the next list by applying these rules recursively.\n * `object`: concatenate the (field name, field value) pairs. If a\n field name is duplicated, then apply these rules recursively\n to merge the field values.\n\nSome examples of merging:\n\n # Strings are concatenated.\n \"foo\", \"bar\" =\u003e \"foobar\"\n\n # Lists of non-strings are concatenated.\n [2, 3], [4] =\u003e [2, 3, 4]\n\n # Lists are concatenated, but the last and first elements are merged\n # because they are strings.\n [\"a\", \"b\"], [\"c\", \"d\"] =\u003e [\"a\", \"bc\", \"d\"]\n\n # Lists are concatenated, but the last and first elements are merged\n # because they are lists. Recursively, the last and first elements\n # of the inner lists are merged because they are strings.\n [\"a\", [\"b\", \"c\"]], [[\"d\"], \"e\"] =\u003e [\"a\", [\"b\", \"cd\"], \"e\"]\n\n # Non-overlapping object fields are combined.\n {\"a\": \"1\"}, {\"b\": \"2\"} =\u003e {\"a\": \"1\", \"b\": 2\"}\n\n # Overlapping object fields are merged.\n {\"a\": \"1\"}, {\"a\": \"2\"} =\u003e {\"a\": \"12\"}\n\n # Examples of merging objects containing lists of strings.\n {\"a\": [\"1\"]}, {\"a\": [\"2\"]} =\u003e {\"a\": [\"12\"]}\n\nFor a more complete example, suppose a streaming SQL query is\nyielding a result set whose rows contain a single string\nfield. The following `PartialResultSet`s might be yielded:\n\n {\n \"metadata\": { ... }\n \"values\": [\"Hello\", \"W\"]\n \"chunked_value\": true\n \"resume_token\": \"Af65...\"\n }\n {\n \"values\": [\"orl\"]\n \"chunked_value\": true\n \"resume_token\": \"Bqp2...\"\n }\n {\n \"values\": [\"d\"]\n \"resume_token\": \"Zx1B...\"\n }\n\nThis sequence of `PartialResultSet`s encodes two rows, one\ncontaining the field value `\"Hello\"`, and a second containing the\nfield value `\"World\" = \"W\" + \"orl\" + \"d\"`.", @@ -2023,7 +1991,7 @@ "description": "Additional options that affect how many partitions are created." }, "sql": { - "description": "The query request to generate partitions for. The request will fail if\nthe query is not root partitionable. The query plan of a root\npartitionable query has a single distributed union operator. A distributed\nunion operator conceptually divides one or more tables into multiple\nsplits, remotely evaluates a subquery independently on each split, and\nthen unions all results.\n\nThis must not contain DML commands, such as INSERT, UPDATE, or\nDELETE. Use ExecuteStreamingSql with a\nPartitionedDml transaction for large, partition-friendly DML operations.", + "description": "The query request to generate partitions for. The request will fail if\nthe query is not root partitionable. The query plan of a root\npartitionable query has a single distributed union operator. A distributed\nunion operator conceptually divides one or more tables into multiple\nsplits, remotely evaluates a subquery independently on each split, and\nthen unions all results.", "type": "string" }, "transaction": { @@ -2085,12 +2053,6 @@ }, "type": "object" }, - "PartitionedDml": { - "description": "Message type to initiate a Partitioned DML transaction.", - "id": "PartitionedDml", - "properties": {}, - "type": "object" - }, "PlanNode": { "description": "Node information for nodes appearing in a QueryPlan.plan_nodes.", "id": "PlanNode", @@ -2292,7 +2254,7 @@ }, "stats": { "$ref": "ResultSetStats", - "description": "Query plan and execution statistics for the SQL statement that\nproduced this result set. These can be requested by setting\nExecuteSqlRequest.query_mode.\nDML statements always produce stats containing the number of rows\nmodified, unless executed using the\nExecuteSqlRequest.QueryMode.PLAN ExecuteSqlRequest.query_mode.\nOther fields may or may not be populated, based on the\nExecuteSqlRequest.query_mode." + "description": "Query plan and execution statistics for the SQL statement that\nproduced this result set. These can be requested by setting\nExecuteSqlRequest.query_mode." } }, "type": "object" @@ -2327,16 +2289,6 @@ }, "description": "Aggregated statistics from the execution of the query. Only present when\nthe query is profiled. For example, a query could return the statistics as\nfollows:\n\n {\n \"rows_returned\": \"3\",\n \"elapsed_time\": \"1.22 secs\",\n \"cpu_time\": \"1.19 secs\"\n }", "type": "object" - }, - "rowCountExact": { - "description": "Standard DML returns an exact count of rows that were modified.", - "format": "int64", - "type": "string" - }, - "rowCountLowerBound": { - "description": "Partitioned DML does not offer exactly-once semantics, so it\nreturns a lower bound of the rows modified.", - "format": "int64", - "type": "string" } }, "type": "object" @@ -2498,13 +2450,9 @@ "type": "object" }, "TransactionOptions": { - "description": "# Transactions\n\n\nEach session can have at most one active transaction at a time. After the\nactive transaction is completed, the session can immediately be\nre-used for the next transaction. It is not necessary to create a\nnew session for each transaction.\n\n# Transaction Modes\n\nCloud Spanner supports three transaction modes:\n\n 1. Locking read-write. This type of transaction is the only way\n to write data into Cloud Spanner. These transactions rely on\n pessimistic locking and, if necessary, two-phase commit.\n Locking read-write transactions may abort, requiring the\n application to retry.\n\n 2. Snapshot read-only. This transaction type provides guaranteed\n consistency across several reads, but does not allow\n writes. Snapshot read-only transactions can be configured to\n read at timestamps in the past. Snapshot read-only\n transactions do not need to be committed.\n\n 3. Partitioned DML. This type of transaction is used to execute\n a single Partitioned DML statement. Partitioned DML partitions\n the key space and runs the DML statement over each partition\n in parallel using separate, internal transactions that commit\n independently. Partitioned DML transactions do not need to be\n committed.\n\nFor transactions that only read, snapshot read-only transactions\nprovide simpler semantics and are almost always faster. In\nparticular, read-only transactions do not take locks, so they do\nnot conflict with read-write transactions. As a consequence of not\ntaking locks, they also do not abort, so retry loops are not needed.\n\nTransactions may only read/write data in a single database. They\nmay, however, read/write data in different tables within that\ndatabase.\n\n## Locking Read-Write Transactions\n\nLocking transactions may be used to atomically read-modify-write\ndata anywhere in a database. This type of transaction is externally\nconsistent.\n\nClients should attempt to minimize the amount of time a transaction\nis active. Faster transactions commit with higher probability\nand cause less contention. Cloud Spanner attempts to keep read locks\nactive as long as the transaction continues to do reads, and the\ntransaction has not been terminated by\nCommit or\nRollback. Long periods of\ninactivity at the client may cause Cloud Spanner to release a\ntransaction's locks and abort it.\n\nConceptually, a read-write transaction consists of zero or more\nreads or SQL statements followed by\nCommit. At any time before\nCommit, the client can send a\nRollback request to abort the\ntransaction.\n\n### Semantics\n\nCloud Spanner can commit the transaction if all read locks it acquired\nare still valid at commit time, and it is able to acquire write\nlocks for all writes. Cloud Spanner can abort the transaction for any\nreason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees\nthat the transaction has not modified any user data in Cloud Spanner.\n\nUnless the transaction commits, Cloud Spanner makes no guarantees about\nhow long the transaction's locks were held for. It is an error to\nuse Cloud Spanner locks for any sort of mutual exclusion other than\nbetween Cloud Spanner transactions themselves.\n\n### Retrying Aborted Transactions\n\nWhen a transaction aborts, the application can choose to retry the\nwhole transaction again. To maximize the chances of successfully\ncommitting the retry, the client should execute the retry in the\nsame session as the original attempt. The original session's lock\npriority increases with each consecutive abort, meaning that each\nattempt has a slightly better chance of success than the previous.\n\nUnder some circumstances (e.g., many transactions attempting to\nmodify the same row(s)), a transaction can abort many times in a\nshort period before successfully committing. Thus, it is not a good\nidea to cap the number of retries a transaction can attempt;\ninstead, it is better to limit the total amount of wall time spent\nretrying.\n\n### Idle Transactions\n\nA transaction is considered idle if it has no outstanding reads or\nSQL queries and has not started a read or SQL query within the last 10\nseconds. Idle transactions can be aborted by Cloud Spanner so that they\ndon't hold on to locks indefinitely. In that case, the commit will\nfail with error `ABORTED`.\n\nIf this behavior is undesirable, periodically executing a simple\nSQL query in the transaction (e.g., `SELECT 1`) prevents the\ntransaction from becoming idle.\n\n## Snapshot Read-Only Transactions\n\nSnapshot read-only transactions provides a simpler method than\nlocking read-write transactions for doing several consistent\nreads. However, this type of transaction does not support writes.\n\nSnapshot transactions do not take locks. Instead, they work by\nchoosing a Cloud Spanner timestamp, then executing all reads at that\ntimestamp. Since they do not acquire locks, they do not block\nconcurrent read-write transactions.\n\nUnlike locking read-write transactions, snapshot read-only\ntransactions never abort. They can fail if the chosen read\ntimestamp is garbage collected; however, the default garbage\ncollection policy is generous enough that most applications do not\nneed to worry about this in practice.\n\nSnapshot read-only transactions do not need to call\nCommit or\nRollback (and in fact are not\npermitted to do so).\n\nTo execute a snapshot transaction, the client specifies a timestamp\nbound, which tells Cloud Spanner how to choose a read timestamp.\n\nThe types of timestamp bound are:\n\n - Strong (the default).\n - Bounded staleness.\n - Exact staleness.\n\nIf the Cloud Spanner database to be read is geographically distributed,\nstale read-only transactions can execute more quickly than strong\nor read-write transaction, because they are able to execute far\nfrom the leader replica.\n\nEach type of timestamp bound is discussed in detail below.\n\n### Strong\n\nStrong reads are guaranteed to see the effects of all transactions\nthat have committed before the start of the read. Furthermore, all\nrows yielded by a single read are consistent with each other -- if\nany part of the read observes a transaction, all parts of the read\nsee the transaction.\n\nStrong reads are not repeatable: two consecutive strong read-only\ntransactions might return inconsistent results if there are\nconcurrent writes. If consistency across reads is required, the\nreads should be executed within a transaction or at an exact read\ntimestamp.\n\nSee TransactionOptions.ReadOnly.strong.\n\n### Exact Staleness\n\nThese timestamp bounds execute reads at a user-specified\ntimestamp. Reads at a timestamp are guaranteed to see a consistent\nprefix of the global transaction history: they observe\nmodifications done by all transactions with a commit timestamp \u003c=\nthe read timestamp, and observe none of the modifications done by\ntransactions with a larger commit timestamp. They will block until\nall conflicting transactions that may be assigned commit timestamps\n\u003c= the read timestamp have finished.\n\nThe timestamp can either be expressed as an absolute Cloud Spanner commit\ntimestamp or a staleness relative to the current time.\n\nThese modes do not require a \"negotiation phase\" to pick a\ntimestamp. As a result, they execute slightly faster than the\nequivalent boundedly stale concurrency modes. On the other hand,\nboundedly stale reads usually return fresher results.\n\nSee TransactionOptions.ReadOnly.read_timestamp and\nTransactionOptions.ReadOnly.exact_staleness.\n\n### Bounded Staleness\n\nBounded staleness modes allow Cloud Spanner to pick the read timestamp,\nsubject to a user-provided staleness bound. Cloud Spanner chooses the\nnewest timestamp within the staleness bound that allows execution\nof the reads at the closest available replica without blocking.\n\nAll rows yielded are consistent with each other -- if any part of\nthe read observes a transaction, all parts of the read see the\ntransaction. Boundedly stale reads are not repeatable: two stale\nreads, even if they use the same staleness bound, can execute at\ndifferent timestamps and thus return inconsistent results.\n\nBoundedly stale reads execute in two phases: the first phase\nnegotiates a timestamp among all replicas needed to serve the\nread. In the second phase, reads are executed at the negotiated\ntimestamp.\n\nAs a result of the two phase execution, bounded staleness reads are\nusually a little slower than comparable exact staleness\nreads. However, they are typically able to return fresher\nresults, and are more likely to execute at the closest replica.\n\nBecause the timestamp negotiation requires up-front knowledge of\nwhich rows will be read, it can only be used with single-use\nread-only transactions.\n\nSee TransactionOptions.ReadOnly.max_staleness and\nTransactionOptions.ReadOnly.min_read_timestamp.\n\n### Old Read Timestamps and Garbage Collection\n\nCloud Spanner continuously garbage collects deleted and overwritten data\nin the background to reclaim storage space. This process is known\nas \"version GC\". By default, version GC reclaims versions after they\nare one hour old. Because of this, Cloud Spanner cannot perform reads\nat read timestamps more than one hour in the past. This\nrestriction also applies to in-progress reads and/or SQL queries whose\ntimestamp become too old while executing. Reads and SQL queries with\ntoo-old read timestamps fail with the error `FAILED_PRECONDITION`.\n\n## Partitioned DML Transactions\n\nPartitioned DML transactions are used to execute DML statements with a\ndifferent execution strategy that provides different, and often better,\nscalability properties for large, table-wide operations than DML in a\nReadWrite transaction. Smaller scoped statements, such as an OLTP workload,\nshould prefer using ReadWrite transactions.\n\nPartitioned DML partitions the keyspace and runs the DML statement on each\npartition in separate, internal transactions. These transactions commit\nautomatically when complete, and run independently from one another.\n\nTo reduce lock contention, this execution strategy only acquires read locks\non rows that match the WHERE clause of the statement. Additionally, the\nsmaller per-partition transactions hold locks for less time.\n\nThat said, Partitioned DML is not a drop-in replacement for standard DML used\nin ReadWrite transactions.\n\n - The DML statement must be fully-partitionable. Specifically, the statement\n must be expressible as the union of many statements which each access only\n a single row of the table.\n\n - The statement is not applied atomically to all rows of the table. Rather,\n the statement is applied atomically to partitions of the table, in\n independent transactions. Secondary index rows are updated atomically\n with the base table rows.\n\n - Partitioned DML does not guarantee exactly-once execution semantics\n against a partition. The statement will be applied at least once to each\n partition. It is strongly recommended that the DML statement should be\n idempotent to avoid unexpected results. For instance, it is potentially\n dangerous to run a statement such as\n `UPDATE table SET column = column + 1` as it could be run multiple times\n against some rows.\n\n - The partitions are committed automatically - there is no support for\n Commit or Rollback. If the call returns an error, or if the client issuing\n the ExecuteSql call dies, it is possible that some rows had the statement\n executed on them successfully. It is also possible that statement was\n never executed against other rows.\n\n - Partitioned DML transactions may only contain the execution of a single\n DML statement via ExecuteSql or ExecuteStreamingSql.\n\n - If any error is encountered during the execution of the partitioned DML\n operation (for instance, a UNIQUE INDEX violation, division by zero, or a\n value that cannot be stored due to schema constraints), then the\n operation is stopped at that point and an error is returned. It is\n possible that at this point, some partitions have been committed (or even\n committed multiple times), and other partitions have not been run at all.\n\nGiven the above, Partitioned DML is good fit for large, database-wide,\noperations that are idempotent, such as deleting old rows from a very large\ntable.", + "description": "# Transactions\n\n\nEach session can have at most one active transaction at a time. After the\nactive transaction is completed, the session can immediately be\nre-used for the next transaction. It is not necessary to create a\nnew session for each transaction.\n\n# Transaction Modes\n\nCloud Spanner supports two transaction modes:\n\n 1. Locking read-write. This type of transaction is the only way\n to write data into Cloud Spanner. These transactions rely on\n pessimistic locking and, if necessary, two-phase commit.\n Locking read-write transactions may abort, requiring the\n application to retry.\n\n 2. Snapshot read-only. This transaction type provides guaranteed\n consistency across several reads, but does not allow\n writes. Snapshot read-only transactions can be configured to\n read at timestamps in the past. Snapshot read-only\n transactions do not need to be committed.\n\n\nFor transactions that only read, snapshot read-only transactions\nprovide simpler semantics and are almost always faster. In\nparticular, read-only transactions do not take locks, so they do\nnot conflict with read-write transactions. As a consequence of not\ntaking locks, they also do not abort, so retry loops are not needed.\n\nTransactions may only read/write data in a single database. They\nmay, however, read/write data in different tables within that\ndatabase.\n\n## Locking Read-Write Transactions\n\nLocking transactions may be used to atomically read-modify-write\ndata anywhere in a database. This type of transaction is externally\nconsistent.\n\nClients should attempt to minimize the amount of time a transaction\nis active. Faster transactions commit with higher probability\nand cause less contention. Cloud Spanner attempts to keep read locks\nactive as long as the transaction continues to do reads, and the\ntransaction has not been terminated by\nCommit or\nRollback. Long periods of\ninactivity at the client may cause Cloud Spanner to release a\ntransaction's locks and abort it.\n\nReads performed within a transaction acquire locks on the data\nbeing read. Writes can only be done at commit time, after all reads\nhave been completed.\nConceptually, a read-write transaction consists of zero or more\nreads or SQL queries followed by\nCommit. At any time before\nCommit, the client can send a\nRollback request to abort the\ntransaction.\n\n### Semantics\n\nCloud Spanner can commit the transaction if all read locks it acquired\nare still valid at commit time, and it is able to acquire write\nlocks for all writes. Cloud Spanner can abort the transaction for any\nreason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees\nthat the transaction has not modified any user data in Cloud Spanner.\n\nUnless the transaction commits, Cloud Spanner makes no guarantees about\nhow long the transaction's locks were held for. It is an error to\nuse Cloud Spanner locks for any sort of mutual exclusion other than\nbetween Cloud Spanner transactions themselves.\n\n### Retrying Aborted Transactions\n\nWhen a transaction aborts, the application can choose to retry the\nwhole transaction again. To maximize the chances of successfully\ncommitting the retry, the client should execute the retry in the\nsame session as the original attempt. The original session's lock\npriority increases with each consecutive abort, meaning that each\nattempt has a slightly better chance of success than the previous.\n\nUnder some circumstances (e.g., many transactions attempting to\nmodify the same row(s)), a transaction can abort many times in a\nshort period before successfully committing. Thus, it is not a good\nidea to cap the number of retries a transaction can attempt;\ninstead, it is better to limit the total amount of wall time spent\nretrying.\n\n### Idle Transactions\n\nA transaction is considered idle if it has no outstanding reads or\nSQL queries and has not started a read or SQL query within the last 10\nseconds. Idle transactions can be aborted by Cloud Spanner so that they\ndon't hold on to locks indefinitely. In that case, the commit will\nfail with error `ABORTED`.\n\nIf this behavior is undesirable, periodically executing a simple\nSQL query in the transaction (e.g., `SELECT 1`) prevents the\ntransaction from becoming idle.\n\n## Snapshot Read-Only Transactions\n\nSnapshot read-only transactions provides a simpler method than\nlocking read-write transactions for doing several consistent\nreads. However, this type of transaction does not support writes.\n\nSnapshot transactions do not take locks. Instead, they work by\nchoosing a Cloud Spanner timestamp, then executing all reads at that\ntimestamp. Since they do not acquire locks, they do not block\nconcurrent read-write transactions.\n\nUnlike locking read-write transactions, snapshot read-only\ntransactions never abort. They can fail if the chosen read\ntimestamp is garbage collected; however, the default garbage\ncollection policy is generous enough that most applications do not\nneed to worry about this in practice.\n\nSnapshot read-only transactions do not need to call\nCommit or\nRollback (and in fact are not\npermitted to do so).\n\nTo execute a snapshot transaction, the client specifies a timestamp\nbound, which tells Cloud Spanner how to choose a read timestamp.\n\nThe types of timestamp bound are:\n\n - Strong (the default).\n - Bounded staleness.\n - Exact staleness.\n\nIf the Cloud Spanner database to be read is geographically distributed,\nstale read-only transactions can execute more quickly than strong\nor read-write transaction, because they are able to execute far\nfrom the leader replica.\n\nEach type of timestamp bound is discussed in detail below.\n\n### Strong\n\nStrong reads are guaranteed to see the effects of all transactions\nthat have committed before the start of the read. Furthermore, all\nrows yielded by a single read are consistent with each other -- if\nany part of the read observes a transaction, all parts of the read\nsee the transaction.\n\nStrong reads are not repeatable: two consecutive strong read-only\ntransactions might return inconsistent results if there are\nconcurrent writes. If consistency across reads is required, the\nreads should be executed within a transaction or at an exact read\ntimestamp.\n\nSee TransactionOptions.ReadOnly.strong.\n\n### Exact Staleness\n\nThese timestamp bounds execute reads at a user-specified\ntimestamp. Reads at a timestamp are guaranteed to see a consistent\nprefix of the global transaction history: they observe\nmodifications done by all transactions with a commit timestamp \u003c=\nthe read timestamp, and observe none of the modifications done by\ntransactions with a larger commit timestamp. They will block until\nall conflicting transactions that may be assigned commit timestamps\n\u003c= the read timestamp have finished.\n\nThe timestamp can either be expressed as an absolute Cloud Spanner commit\ntimestamp or a staleness relative to the current time.\n\nThese modes do not require a \"negotiation phase\" to pick a\ntimestamp. As a result, they execute slightly faster than the\nequivalent boundedly stale concurrency modes. On the other hand,\nboundedly stale reads usually return fresher results.\n\nSee TransactionOptions.ReadOnly.read_timestamp and\nTransactionOptions.ReadOnly.exact_staleness.\n\n### Bounded Staleness\n\nBounded staleness modes allow Cloud Spanner to pick the read timestamp,\nsubject to a user-provided staleness bound. Cloud Spanner chooses the\nnewest timestamp within the staleness bound that allows execution\nof the reads at the closest available replica without blocking.\n\nAll rows yielded are consistent with each other -- if any part of\nthe read observes a transaction, all parts of the read see the\ntransaction. Boundedly stale reads are not repeatable: two stale\nreads, even if they use the same staleness bound, can execute at\ndifferent timestamps and thus return inconsistent results.\n\nBoundedly stale reads execute in two phases: the first phase\nnegotiates a timestamp among all replicas needed to serve the\nread. In the second phase, reads are executed at the negotiated\ntimestamp.\n\nAs a result of the two phase execution, bounded staleness reads are\nusually a little slower than comparable exact staleness\nreads. However, they are typically able to return fresher\nresults, and are more likely to execute at the closest replica.\n\nBecause the timestamp negotiation requires up-front knowledge of\nwhich rows will be read, it can only be used with single-use\nread-only transactions.\n\nSee TransactionOptions.ReadOnly.max_staleness and\nTransactionOptions.ReadOnly.min_read_timestamp.\n\n### Old Read Timestamps and Garbage Collection\n\nCloud Spanner continuously garbage collects deleted and overwritten data\nin the background to reclaim storage space. This process is known\nas \"version GC\". By default, version GC reclaims versions after they\nare one hour old. Because of this, Cloud Spanner cannot perform reads\nat read timestamps more than one hour in the past. This\nrestriction also applies to in-progress reads and/or SQL queries whose\ntimestamp become too old while executing. Reads and SQL queries with\ntoo-old read timestamps fail with the error `FAILED_PRECONDITION`.\n\n##", "id": "TransactionOptions", "properties": { - "partitionedDml": { - "$ref": "PartitionedDml", - "description": "Partitioned DML transaction.\n\nAuthorization to begin a Partitioned DML transaction requires\n`spanner.databases.beginPartitionedDmlTransaction` permission\non the `session` resource." - }, "readOnly": { "$ref": "ReadOnly", "description": "Transaction will not write.\n\nAuthorization to begin a read-only transaction requires\n`spanner.databases.beginReadOnlyTransaction` permission\non the `session` resource." diff --git a/vendor/google.golang.org/api/spanner/v1/spanner-gen.go b/vendor/google.golang.org/api/spanner/v1/spanner-gen.go index 4ac22b6f..92b2248a 100644 --- a/vendor/google.golang.org/api/spanner/v1/spanner-gen.go +++ b/vendor/google.golang.org/api/spanner/v1/spanner-gen.go @@ -16,16 +16,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -195,15 +194,6 @@ func (s *BeginTransactionRequest) MarshalJSON() ([]byte, error) { // Binding: Associates `members` with a `role`. type Binding struct { - // Condition: Unimplemented. The condition that is associated with this - // binding. - // NOTE: an unsatisfied condition will not allow user access via - // current - // binding. Different bindings, including their conditions, are - // examined - // independently. - Condition *Expr `json:"condition,omitempty"` - // Members: Specifies the identities requesting access for a Cloud // Platform resource. // `members` can have the following values: @@ -240,10 +230,12 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to `members`. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or + // `roles/owner`. + // Required Role string `json:"role,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to + // ForceSendFields is a list of field names (e.g. "Members") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -251,7 +243,7 @@ type Binding struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in + // NullFields is a list of field names (e.g. "Members") 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 @@ -761,45 +753,12 @@ type ExecuteSqlRequest struct { // request that yielded this token. ResumeToken string `json:"resumeToken,omitempty"` - // Seqno: A per-transaction sequence number used to identify this - // request. This - // makes each request idempotent such that if the request is received - // multiple - // times, at most one will succeed. - // - // The sequence number must be monotonically increasing within - // the - // transaction. If a request arrives for the first time with an - // out-of-order - // sequence number, the transaction may be aborted. Replays of - // previously - // handled requests will yield the same response as the first - // execution. - // - // Required for DML statements. Ignored for queries. - Seqno int64 `json:"seqno,omitempty,string"` - // Sql: Required. The SQL string. Sql string `json:"sql,omitempty"` // Transaction: The transaction to use. If none is provided, the default // is a // temporary read-only transaction with strong concurrency. - // - // The transaction to use. - // - // For queries, if none is provided, the default is a temporary - // read-only - // transaction with strong concurrency. - // - // Standard DML statements require a ReadWrite transaction. - // Single-use - // transactions are not supported (to avoid replay). The caller - // must - // either supply an existing transaction ID or begin a new - // transaction. - // - // Partitioned DML requires an existing PartitionedDml transaction ID. Transaction *TransactionSelector `json:"transaction,omitempty"` // ForceSendFields is a list of field names (e.g. "ParamTypes") to @@ -825,60 +784,6 @@ func (s *ExecuteSqlRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Expr: Represents an expression text. Example: -// -// title: "User account presence" -// description: "Determines whether the request has a user account" -// expression: "size(request.user) > 0" -type Expr struct { - // Description: An optional description of the expression. This is a - // longer text which - // describes the expression, e.g. when hovered over it in a UI. - Description string `json:"description,omitempty"` - - // Expression: Textual representation of an expression in - // Common Expression Language syntax. - // - // The application context of the containing message determines - // which - // well-known feature set of CEL is supported. - Expression string `json:"expression,omitempty"` - - // Location: An optional string indicating the location of the - // expression for error - // reporting, e.g. a file name and a position in the file. - Location string `json:"location,omitempty"` - - // Title: An optional title for the expression, i.e. a short string - // describing - // its purpose. This can be used e.g. in UIs which allow to enter - // the - // expression. - Title string `json:"title,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Expr) MarshalJSON() ([]byte, error) { - type NoMethod Expr - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Field: Message representing a single field of a struct. type Field struct { // Name: The name of the field. For reads, this is the column name. @@ -1663,9 +1568,6 @@ type PartialResultSet struct { // setting // ExecuteSqlRequest.query_mode and are sent // only once with the last response in the stream. - // This field will also be present in the last response for - // DML - // statements. Stats *ResultSetStats `json:"stats,omitempty"` // Values: A streamed result set consists of a stream of values, which @@ -1918,12 +1820,6 @@ type PartitionQueryRequest struct { // splits, remotely evaluates a subquery independently on each split, // and // then unions all results. - // - // This must not contain DML commands, such as INSERT, UPDATE, - // or - // DELETE. Use ExecuteStreamingSql with a - // PartitionedDml transaction for large, partition-friendly DML - // operations. Sql string `json:"sql,omitempty"` // Transaction: Read only snapshot transactions are supported, @@ -2048,11 +1944,6 @@ func (s *PartitionResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PartitionedDml: Message type to initiate a Partitioned DML -// transaction. -type PartitionedDml struct { -} - // PlanNode: Node information for nodes appearing in a // QueryPlan.plan_nodes. type PlanNode struct { @@ -2494,13 +2385,6 @@ type ResultSet struct { // produced this result set. These can be requested by // setting // ExecuteSqlRequest.query_mode. - // DML statements always produce stats containing the number of - // rows - // modified, unless executed using the - // ExecuteSqlRequest.QueryMode.PLAN ExecuteSqlRequest.query_mode. - // Other fields may or may not be populated, based on - // the - // ExecuteSqlRequest.query_mode. Stats *ResultSetStats `json:"stats,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -2591,15 +2475,6 @@ type ResultSetStats struct { // } QueryStats googleapi.RawMessage `json:"queryStats,omitempty"` - // RowCountExact: Standard DML returns an exact count of rows that were - // modified. - RowCountExact int64 `json:"rowCountExact,omitempty,string"` - - // RowCountLowerBound: Partitioned DML does not offer exactly-once - // semantics, so it - // returns a lower bound of the rows modified. - RowCountLowerBound int64 `json:"rowCountLowerBound,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "QueryPlan") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -3070,7 +2945,7 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // // # Transaction Modes // -// Cloud Spanner supports three transaction modes: +// Cloud Spanner supports two transaction modes: // // 1. Locking read-write. This type of transaction is the only way // to write data into Cloud Spanner. These transactions rely on @@ -3084,12 +2959,6 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // read at timestamps in the past. Snapshot read-only // transactions do not need to be committed. // -// 3. Partitioned DML. This type of transaction is used to execute -// a single Partitioned DML statement. Partitioned DML partitions -// the key space and runs the DML statement over each partition -// in parallel using separate, internal transactions that commit -// independently. Partitioned DML transactions do not need to be -// committed. // // For transactions that only read, snapshot read-only // transactions @@ -3127,8 +2996,12 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // a // transaction's locks and abort it. // +// Reads performed within a transaction acquire locks on the data +// being read. Writes can only be done at commit time, after all +// reads +// have been completed. // Conceptually, a read-write transaction consists of zero or more -// reads or SQL statements followed by +// reads or SQL queries followed by // Commit. At any time before // Commit, the client can send a // Rollback request to abort the @@ -3355,102 +3228,8 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // too-old read timestamps fail with the error // `FAILED_PRECONDITION`. // -// ## Partitioned DML Transactions -// -// Partitioned DML transactions are used to execute DML statements with -// a -// different execution strategy that provides different, and often -// better, -// scalability properties for large, table-wide operations than DML in -// a -// ReadWrite transaction. Smaller scoped statements, such as an OLTP -// workload, -// should prefer using ReadWrite transactions. -// -// Partitioned DML partitions the keyspace and runs the DML statement on -// each -// partition in separate, internal transactions. These transactions -// commit -// automatically when complete, and run independently from one -// another. -// -// To reduce lock contention, this execution strategy only acquires read -// locks -// on rows that match the WHERE clause of the statement. Additionally, -// the -// smaller per-partition transactions hold locks for less time. -// -// That said, Partitioned DML is not a drop-in replacement for standard -// DML used -// in ReadWrite transactions. -// -// - The DML statement must be fully-partitionable. Specifically, the -// statement -// must be expressible as the union of many statements which each -// access only -// a single row of the table. -// -// - The statement is not applied atomically to all rows of the table. -// Rather, -// the statement is applied atomically to partitions of the table, -// in -// independent transactions. Secondary index rows are updated -// atomically -// with the base table rows. -// -// - Partitioned DML does not guarantee exactly-once execution -// semantics -// against a partition. The statement will be applied at least once -// to each -// partition. It is strongly recommended that the DML statement -// should be -// idempotent to avoid unexpected results. For instance, it is -// potentially -// dangerous to run a statement such as -// `UPDATE table SET column = column + 1` as it could be run multiple -// times -// against some rows. -// -// - The partitions are committed automatically - there is no support -// for -// Commit or Rollback. If the call returns an error, or if the client -// issuing -// the ExecuteSql call dies, it is possible that some rows had the -// statement -// executed on them successfully. It is also possible that statement -// was -// never executed against other rows. -// -// - Partitioned DML transactions may only contain the execution of a -// single -// DML statement via ExecuteSql or ExecuteStreamingSql. -// -// - If any error is encountered during the execution of the -// partitioned DML -// operation (for instance, a UNIQUE INDEX violation, division by -// zero, or a -// value that cannot be stored due to schema constraints), then the -// operation is stopped at that point and an error is returned. It -// is -// possible that at this point, some partitions have been committed -// (or even -// committed multiple times), and other partitions have not been run -// at all. -// -// Given the above, Partitioned DML is good fit for large, -// database-wide, -// operations that are idempotent, such as deleting old rows from a very -// large -// table. +// ## type TransactionOptions struct { - // PartitionedDml: Partitioned DML transaction. - // - // Authorization to begin a Partitioned DML transaction - // requires - // `spanner.databases.beginPartitionedDmlTransaction` permission - // on the `session` resource. - PartitionedDml *PartitionedDml `json:"partitionedDml,omitempty"` - // ReadOnly: Transaction will not write. // // Authorization to begin a read-only transaction @@ -3467,7 +3246,7 @@ type TransactionOptions struct { // on the `session` resource. ReadWrite *ReadWrite `json:"readWrite,omitempty"` - // ForceSendFields is a list of field names (e.g. "PartitionedDml") to + // ForceSendFields is a list of field names (e.g. "ReadOnly") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -3475,13 +3254,12 @@ type TransactionOptions struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PartitionedDml") 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. "ReadOnly") 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:"-"` } @@ -3926,13 +3704,9 @@ func (c *ProjectsInstanceConfigsGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4088,13 +3862,9 @@ func (c *ProjectsInstanceConfigsListCall) 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, "v1/{+parent}/instanceConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -4297,13 +4067,9 @@ func (c *ProjectsInstancesCreateCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -4441,13 +4207,9 @@ func (c *ProjectsInstancesDeleteCall) doRequest(alt string) (*http.Response, err reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4585,13 +4347,9 @@ func (c *ProjectsInstancesGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -4728,13 +4486,9 @@ func (c *ProjectsInstancesGetIamPolicyCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -4920,13 +4674,9 @@ func (c *ProjectsInstancesListCall) 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, "v1/{+parent}/instances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -5142,13 +4892,9 @@ func (c *ProjectsInstancesPatchCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.nameid, @@ -5287,13 +5033,9 @@ func (c *ProjectsInstancesSetIamPolicyCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -5436,13 +5178,9 @@ func (c *ProjectsInstancesTestIamPermissionsCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -5585,13 +5323,9 @@ func (c *ProjectsInstancesDatabasesCreateCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -5718,13 +5452,9 @@ func (c *ProjectsInstancesDatabasesDropDatabaseCall) doRequest(alt string) (*htt reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "database": c.database, @@ -5862,13 +5592,9 @@ func (c *ProjectsInstancesDatabasesGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -6010,13 +5736,9 @@ func (c *ProjectsInstancesDatabasesGetDdlCall) doRequest(alt string) (*http.Resp } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/ddl") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "database": c.database, @@ -6101,10 +5823,10 @@ type ProjectsInstancesDatabasesGetIamPolicyCall struct { header_ http.Header } -// GetIamPolicy: Gets the access control policy for a database -// resource. -// Returns an empty policy if a database exists but does -// not have a policy set. +// GetIamPolicy: Gets the access control policy for a database resource. +// Returns an empty +// policy if a database exists but does not have a policy +// set. // // Authorization requires `spanner.databases.getIamPolicy` permission // on @@ -6154,13 +5876,9 @@ func (c *ProjectsInstancesDatabasesGetIamPolicyCall) doRequest(alt string) (*htt } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -6206,7 +5924,7 @@ func (c *ProjectsInstancesDatabasesGetIamPolicyCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Gets the access control policy for a database resource.\nReturns an empty policy if a database exists but does\nnot have a policy set.\n\nAuthorization requires `spanner.databases.getIamPolicy` permission on\nresource.", + // "description": "Gets the access control policy for a database resource. Returns an empty\npolicy if a database exists but does not have a policy set.\n\nAuthorization requires `spanner.databases.getIamPolicy` permission on\nresource.", // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:getIamPolicy", // "httpMethod": "POST", // "id": "spanner.projects.instances.databases.getIamPolicy", @@ -6318,13 +6036,9 @@ func (c *ProjectsInstancesDatabasesListCall) 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, "v1/{+parent}/databases") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, @@ -6441,12 +6155,13 @@ type ProjectsInstancesDatabasesSetIamPolicyCall struct { header_ http.Header } -// SetIamPolicy: Sets the access control policy on a database -// resource. -// Replaces any existing policy. +// SetIamPolicy: Sets the access control policy on a database resource. +// Replaces any +// existing policy. // -// Authorization requires `spanner.databases.setIamPolicy` -// permission on resource. +// Authorization requires `spanner.databases.setIamPolicy` permission +// on +// resource. func (r *ProjectsInstancesDatabasesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsInstancesDatabasesSetIamPolicyCall { c := &ProjectsInstancesDatabasesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -6492,13 +6207,9 @@ func (c *ProjectsInstancesDatabasesSetIamPolicyCall) doRequest(alt string) (*htt } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -6544,7 +6255,7 @@ func (c *ProjectsInstancesDatabasesSetIamPolicyCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Sets the access control policy on a database resource.\nReplaces any existing policy.\n\nAuthorization requires `spanner.databases.setIamPolicy`\npermission on resource.", + // "description": "Sets the access control policy on a database resource. Replaces any\nexisting policy.\n\nAuthorization requires `spanner.databases.setIamPolicy` permission on\nresource.", // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:setIamPolicy", // "httpMethod": "POST", // "id": "spanner.projects.instances.databases.setIamPolicy", @@ -6589,11 +6300,13 @@ type ProjectsInstancesDatabasesTestIamPermissionsCall struct { // TestIamPermissions: Returns permissions that the caller has on the // specified database resource. // -// Attempting this RPC on a non-existent Cloud Spanner database -// will -// result in a NOT_FOUND error if the user has -// `spanner.databases.list` permission on the containing Cloud -// Spanner instance. Otherwise returns an empty set of permissions. +// Attempting this RPC on a non-existent Cloud Spanner database will +// result in +// a NOT_FOUND error if the user has `spanner.databases.list` permission +// on +// the containing Cloud Spanner instance. Otherwise returns an empty set +// of +// permissions. func (r *ProjectsInstancesDatabasesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesDatabasesTestIamPermissionsCall { c := &ProjectsInstancesDatabasesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -6639,13 +6352,9 @@ func (c *ProjectsInstancesDatabasesTestIamPermissionsCall) doRequest(alt string) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, @@ -6691,7 +6400,7 @@ func (c *ProjectsInstancesDatabasesTestIamPermissionsCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Returns permissions that the caller has on the specified database resource.\n\nAttempting this RPC on a non-existent Cloud Spanner database will\nresult in a NOT_FOUND error if the user has\n`spanner.databases.list` permission on the containing Cloud\nSpanner instance. Otherwise returns an empty set of permissions.", + // "description": "Returns permissions that the caller has on the specified database resource.\n\nAttempting this RPC on a non-existent Cloud Spanner database will result in\na NOT_FOUND error if the user has `spanner.databases.list` permission on\nthe containing Cloud Spanner instance. Otherwise returns an empty set of\npermissions.", // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:testIamPermissions", // "httpMethod": "POST", // "id": "spanner.projects.instances.databases.testIamPermissions", @@ -6788,13 +6497,9 @@ func (c *ProjectsInstancesDatabasesUpdateDdlCall) doRequest(alt string) (*http.R } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/ddl") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "database": c.database, @@ -6938,13 +6643,9 @@ func (c *ProjectsInstancesDatabasesOperationsCancelCall) doRequest(alt string) ( reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -7074,13 +6775,9 @@ func (c *ProjectsInstancesDatabasesOperationsDeleteCall) doRequest(alt string) ( reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -7222,13 +6919,9 @@ func (c *ProjectsInstancesDatabasesOperationsGetCall) doRequest(alt string) (*ht } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -7403,13 +7096,9 @@ func (c *ProjectsInstancesDatabasesOperationsListCall) doRequest(alt string) (*h } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -7581,13 +7270,9 @@ func (c *ProjectsInstancesDatabasesSessionsBeginTransactionCall) doRequest(alt s } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:beginTransaction") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "session": c.session, @@ -7732,13 +7417,9 @@ func (c *ProjectsInstancesDatabasesSessionsCommitCall) doRequest(alt string) (*h } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:commit") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "session": c.session, @@ -7902,13 +7583,9 @@ func (c *ProjectsInstancesDatabasesSessionsCreateCall) doRequest(alt string) (*h } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/sessions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "database": c.database, @@ -8036,13 +7713,9 @@ func (c *ProjectsInstancesDatabasesSessionsDeleteCall) doRequest(alt string) (*h reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -8186,13 +7859,9 @@ func (c *ProjectsInstancesDatabasesSessionsExecuteSqlCall) doRequest(alt string) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:executeSql") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "session": c.session, @@ -8331,13 +8000,9 @@ func (c *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall) doRequest(al } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:executeStreamingSql") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "session": c.session, @@ -8482,13 +8147,9 @@ func (c *ProjectsInstancesDatabasesSessionsGetCall) doRequest(alt string) (*http } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -8660,13 +8321,9 @@ func (c *ProjectsInstancesDatabasesSessionsListCall) doRequest(alt string) (*htt } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/sessions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "database": c.database, @@ -8799,14 +8456,9 @@ type ProjectsInstancesDatabasesSessionsPartitionQueryCall struct { // the // partition tokens and the ExecuteSqlRequests that use the partition // tokens. -// // Partition tokens become invalid when the session used to create // them -// is deleted, is idle for too long, begins a new transaction, or -// becomes too -// old. When any of these happen, it is not possible to resume the -// query, and -// the whole operation must be restarted from the beginning. +// is deleted or begins a new transaction. func (r *ProjectsInstancesDatabasesSessionsService) PartitionQuery(session string, partitionqueryrequest *PartitionQueryRequest) *ProjectsInstancesDatabasesSessionsPartitionQueryCall { c := &ProjectsInstancesDatabasesSessionsPartitionQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.session = session @@ -8852,13 +8504,9 @@ func (c *ProjectsInstancesDatabasesSessionsPartitionQueryCall) doRequest(alt str } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:partitionQuery") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "session": c.session, @@ -8904,7 +8552,7 @@ func (c *ProjectsInstancesDatabasesSessionsPartitionQueryCall) Do(opts ...google } return ret, nil // { - // "description": "Creates a set of partition tokens that can be used to execute a query\noperation in parallel. Each of the returned partition tokens can be used\nby ExecuteStreamingSql to specify a subset\nof the query result to read. The same session and read-only transaction\nmust be used by the PartitionQueryRequest used to create the\npartition tokens and the ExecuteSqlRequests that use the partition tokens.\n\nPartition tokens become invalid when the session used to create them\nis deleted, is idle for too long, begins a new transaction, or becomes too\nold. When any of these happen, it is not possible to resume the query, and\nthe whole operation must be restarted from the beginning.", + // "description": "Creates a set of partition tokens that can be used to execute a query\noperation in parallel. Each of the returned partition tokens can be used\nby ExecuteStreamingSql to specify a subset\nof the query result to read. The same session and read-only transaction\nmust be used by the PartitionQueryRequest used to create the\npartition tokens and the ExecuteSqlRequests that use the partition tokens.\nPartition tokens become invalid when the session used to create them\nis deleted or begins a new transaction.", // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:partitionQuery", // "httpMethod": "POST", // "id": "spanner.projects.instances.databases.sessions.partitionQuery", @@ -8955,20 +8603,10 @@ type ProjectsInstancesDatabasesSessionsPartitionReadCall struct { // used by // the PartitionReadRequest used to create the partition tokens and // the -// ReadRequests that use the partition tokens. There are no -// ordering -// guarantees on rows returned among the returned partition tokens, or -// even -// within each individual StreamingRead call issued with a -// partition_token. -// +// ReadRequests that use the partition tokens. // Partition tokens become invalid when the session used to create // them -// is deleted, is idle for too long, begins a new transaction, or -// becomes too -// old. When any of these happen, it is not possible to resume the -// read, and -// the whole operation must be restarted from the beginning. +// is deleted or begins a new transaction. func (r *ProjectsInstancesDatabasesSessionsService) PartitionRead(session string, partitionreadrequest *PartitionReadRequest) *ProjectsInstancesDatabasesSessionsPartitionReadCall { c := &ProjectsInstancesDatabasesSessionsPartitionReadCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.session = session @@ -9014,13 +8652,9 @@ func (c *ProjectsInstancesDatabasesSessionsPartitionReadCall) doRequest(alt stri } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:partitionRead") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "session": c.session, @@ -9066,7 +8700,7 @@ func (c *ProjectsInstancesDatabasesSessionsPartitionReadCall) Do(opts ...googlea } return ret, nil // { - // "description": "Creates a set of partition tokens that can be used to execute a read\noperation in parallel. Each of the returned partition tokens can be used\nby StreamingRead to specify a subset of the read\nresult to read. The same session and read-only transaction must be used by\nthe PartitionReadRequest used to create the partition tokens and the\nReadRequests that use the partition tokens. There are no ordering\nguarantees on rows returned among the returned partition tokens, or even\nwithin each individual StreamingRead call issued with a partition_token.\n\nPartition tokens become invalid when the session used to create them\nis deleted, is idle for too long, begins a new transaction, or becomes too\nold. When any of these happen, it is not possible to resume the read, and\nthe whole operation must be restarted from the beginning.", + // "description": "Creates a set of partition tokens that can be used to execute a read\noperation in parallel. Each of the returned partition tokens can be used\nby StreamingRead to specify a subset of the read\nresult to read. The same session and read-only transaction must be used by\nthe PartitionReadRequest used to create the partition tokens and the\nReadRequests that use the partition tokens.\nPartition tokens become invalid when the session used to create them\nis deleted or begins a new transaction.", // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:partitionRead", // "httpMethod": "POST", // "id": "spanner.projects.instances.databases.sessions.partitionRead", @@ -9169,13 +8803,9 @@ func (c *ProjectsInstancesDatabasesSessionsReadCall) doRequest(alt string) (*htt } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:read") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "session": c.session, @@ -9318,13 +8948,9 @@ func (c *ProjectsInstancesDatabasesSessionsRollbackCall) doRequest(alt string) ( } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:rollback") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "session": c.session, @@ -9462,13 +9088,9 @@ func (c *ProjectsInstancesDatabasesSessionsStreamingReadCall) doRequest(alt stri } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:streamingRead") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "session": c.session, @@ -9612,13 +9234,9 @@ func (c *ProjectsInstancesOperationsCancelCall) doRequest(alt string) (*http.Res reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -9748,13 +9366,9 @@ func (c *ProjectsInstancesOperationsDeleteCall) doRequest(alt string) (*http.Res reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -9896,13 +9510,9 @@ func (c *ProjectsInstancesOperationsGetCall) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, @@ -10077,13 +9687,9 @@ func (c *ProjectsInstancesOperationsListCall) doRequest(alt string) (*http.Respo } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, diff --git a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-api.json b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-api.json index a1f19fd2..1bbddd56 100644 --- a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-api.json +++ b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-api.json @@ -15,10 +15,10 @@ "baseUrl": "https://www.googleapis.com/sql/v1beta4/", "batchPath": "batch/sqladmin/v1beta4", "canonicalName": "SQL Admin", - "description": "Creates and manages Cloud SQL instances, which provide fully managed MySQL or PostgreSQL databases.", + "description": "Cloud SQL provides the Cloud SQL Admin API, a REST API for administering your instances programmatically.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/sql/docs/reference/latest", - "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/2mZN4YeAwjZYJZLdyVkbR-kEwpc\"", + "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/RxCLYcP9g8OWcIp3gyyH6nUAsH8\"", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" @@ -190,7 +190,7 @@ ] }, "list": { - "description": "Lists all backup runs associated with a given instance and configuration in the reverse chronological order of the backup initiation time.", + "description": "Lists all backup runs associated with a given instance and configuration in the reverse chronological order of the enqueued time.", "httpMethod": "GET", "id": "sql.backupRuns.list", "parameterOrder": [ @@ -468,7 +468,7 @@ "id": "sql.flags.list", "parameters": { "databaseVersion": { - "description": "Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions.", + "description": "Database version for flag retrieval. Flags are specific to the database version.", "location": "query", "type": "string" } @@ -1138,6 +1138,7 @@ }, "update": { "description": "Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.", + "etagRequired": true, "httpMethod": "PUT", "id": "sql.instances.update", "parameterOrder": [ @@ -1575,12 +1576,14 @@ "parameterOrder": [ "project", "instance", + "host", "name" ], "parameters": { "host": { "description": "Host of the user in the instance.", "location": "query", + "required": true, "type": "string" }, "instance": { @@ -1617,7 +1620,6 @@ } } }, - "revision": "20180917", "rootUrl": "https://www.googleapis.com/", "schemas": { "AclEntry": { @@ -1674,7 +1676,7 @@ "type": "object" }, "BackupRun": { - "description": "A BackupRun resource.", + "description": "A database instance backup run resource.", "id": "BackupRun", "properties": { "description": { @@ -1696,7 +1698,7 @@ "description": "Information about why the backup operation failed. This is only present if the run has the FAILED status." }, "id": { - "description": "The identifier for this backup run. Unique only for a specific Cloud SQL instance.", + "description": "A unique identifier for this backup run. Note that this is unique only within the scope of a particular Cloud SQL instance.", "format": "int64", "type": "string" }, @@ -1804,7 +1806,7 @@ "type": "object" }, "Database": { - "description": "Represents a SQL database on the Cloud SQL instance.", + "description": "A database resource inside a Cloud SQL instance.", "id": "Database", "properties": { "charset": { @@ -1816,7 +1818,7 @@ "type": "string" }, "etag": { - "description": "This field is deprecated and will be removed from a future version of the API.", + "description": "HTTP 1.1 Entity tag for the resource.", "type": "string" }, "instance": { @@ -1859,11 +1861,11 @@ "type": "object" }, "DatabaseFlags": { - "description": "Database flags for Cloud SQL instances.", + "description": "MySQL flags for Cloud SQL instances.", "id": "DatabaseFlags", "properties": { "name": { - "description": "The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags should be specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation.", + "description": "The name of the flag. These flags are passed at instance startup, so include both MySQL server options and MySQL system variables. Flags should be specified with underscores, not hyphens. For more information, see Configuring MySQL Flags in the Google Cloud SQL documentation, as well as the official MySQL documentation for server options and system variables.", "type": "string" }, "value": { @@ -1878,7 +1880,7 @@ "id": "DatabaseInstance", "properties": { "backendType": { - "description": "FIRST_GEN: First Generation instance. MySQL only.\nSECOND_GEN: Second Generation instance or PostgreSQL instance.\nEXTERNAL: A database server that is not managed by Google.\nThis property is read-only; use the tier property in the settings object to determine the database type and Second or First Generation.", + "description": "FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed container.\nSECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM.\nEXTERNAL: A MySQL server that is not managed by Google.", "type": "string" }, "connectionName": { @@ -1886,7 +1888,7 @@ "type": "string" }, "currentDiskSize": { - "description": "The current disk usage of the instance in bytes. This property has been deprecated. Users should use the \"cloudsql.googleapis.com/database/disk/bytes_used\" metric in Cloud Monitoring API instead. Please see this announcement for details.", + "description": "The current disk usage of the instance in bytes. This property has been deprecated. Users should use the \"cloudsql.googleapis.com/database/disk/bytes_used\" metric in Cloud Monitoring API instead. Please see https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for details.", "format": "int64", "type": "string" }, @@ -1895,7 +1897,7 @@ "type": "string" }, "etag": { - "description": "This field is deprecated and will be removed from a future version of the API. Use the settings.settingsVersion field instead.", + "description": "HTTP 1.1 Entity tag for the resource.", "type": "string" }, "failoverReplica": { @@ -1968,7 +1970,7 @@ }, "replicaConfiguration": { "$ref": "ReplicaConfiguration", - "description": "Configuration specific to failover replicas and read replicas." + "description": "Configuration specific to read-replicas replicating from on-premises masters." }, "replicaNames": { "description": "The replicas of the instance.", @@ -2176,7 +2178,7 @@ "type": "object" }, "Flag": { - "description": "A flag resource.", + "description": "A Google Cloud SQL service flag resource.", "id": "Flag", "properties": { "allowedStringValues": { @@ -2785,7 +2787,7 @@ "type": "string" }, "authorizedGaeApplications": { - "description": "The App Engine app IDs that can access this instance. First Generation instances only.", + "description": "The App Engine app IDs that can access this instance. This property is only applicable to First Generation instances.", "items": { "type": "string" }, @@ -2804,12 +2806,12 @@ "type": "boolean" }, "dataDiskSizeGb": { - "description": "The size of data disk, in GB. The data disk size minimum is 10GB. Not used for First Generation instances.", + "description": "The size of data disk, in GB. The data disk size minimum is 10GB. Applies only to Second Generation instances.", "format": "int64", "type": "string" }, "dataDiskType": { - "description": "The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.", + "description": "The type of data disk. Only supported for Second Generation instances. The default type is PD_SSD. Applies only to Second Generation instances.", "type": "string" }, "databaseFlags": { @@ -2838,7 +2840,7 @@ }, "maintenanceWindow": { "$ref": "MaintenanceWindow", - "description": "The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes. Not used for First Generation instances." + "description": "The maintenance window for this instance. This specifies when the instance may be restarted for maintenance purposes. Applies only to Second Generation instances." }, "pricingPlan": { "description": "The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.", @@ -2859,11 +2861,11 @@ "type": "string" }, "storageAutoResize": { - "description": "Configuration to increase storage size automatically. The default value is true. Not used for First Generation instances.", + "description": "Configuration to increase storage size automatically. The default value is true. Applies only to Second Generation instances.", "type": "boolean" }, "storageAutoResizeLimit": { - "description": "The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. Not used for First Generation instances.", + "description": "The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. Applies only to Second Generation instances.", "format": "int64", "type": "string" }, @@ -2874,7 +2876,7 @@ "sql.instances.update" ] }, - "description": "The tier (or machine type) for this instance, for example db-n1-standard-1 (MySQL instances) or db-custom-1-3840 (PostgreSQL instances). For MySQL instances, this property determines whether the instance is First or Second Generation. For more information, see Instance Settings.", + "description": "The tier of service for this instance, for example D1, D2. For more information, see pricing.", "type": "string" }, "userLabels": { @@ -3087,7 +3089,7 @@ "id": "User", "properties": { "etag": { - "description": "This field is deprecated and will be removed from a future version of the API.", + "description": "HTTP 1.1 Entity tag for the resource.", "type": "string" }, "host": { @@ -3104,7 +3106,7 @@ "type": "string" }, "name": { - "description": "The name of the user in the Cloud SQL instance. Can be omitted for update since it is already specified in the URL.", + "description": "The name of the user in the Cloud SQL instance. Can be omitted for update since it is already specified on the URL.", "type": "string" }, "password": { diff --git a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go index 24f67b66..08b1928f 100644 --- a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go +++ b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go @@ -14,16 +14,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -254,7 +253,7 @@ func (s *BackupConfiguration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// BackupRun: A BackupRun resource. +// BackupRun: A database instance backup run resource. type BackupRun struct { // Description: The description of this run, only applicable to // on-demand backups. @@ -272,8 +271,8 @@ type BackupRun struct { // only present if the run has the FAILED status. Error *OperationError `json:"error,omitempty"` - // Id: The identifier for this backup run. Unique only for a specific - // Cloud SQL instance. + // Id: A unique identifier for this backup run. Note that this is unique + // only within the scope of a particular Cloud SQL instance. Id int64 `json:"id,omitempty,string"` // Instance: Name of the database instance. @@ -445,7 +444,7 @@ func (s *CloneContext) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Database: Represents a SQL database on the Cloud SQL instance. +// Database: A database resource inside a Cloud SQL instance. type Database struct { // Charset: The MySQL charset value. Charset string `json:"charset,omitempty"` @@ -453,8 +452,7 @@ type Database struct { // Collation: The MySQL collation value. Collation string `json:"collation,omitempty"` - // Etag: This field is deprecated and will be removed from a future - // version of the API. + // Etag: HTTP 1.1 Entity tag for the resource. Etag string `json:"etag,omitempty"` // Instance: The name of the Cloud SQL instance. This does not include @@ -502,13 +500,14 @@ func (s *Database) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DatabaseFlags: Database flags for Cloud SQL instances. +// DatabaseFlags: MySQL flags for Cloud SQL instances. type DatabaseFlags struct { // Name: The name of the flag. These flags are passed at instance - // startup, so include both server options and system variables for - // MySQL. Flags should be specified with underscores, not hyphens. For - // more information, see Configuring Database Flags in the Cloud SQL - // documentation. + // startup, so include both MySQL server options and MySQL system + // variables. Flags should be specified with underscores, not hyphens. + // For more information, see Configuring MySQL Flags in the Google Cloud + // SQL documentation, as well as the official MySQL documentation for + // server options and system variables. Name string `json:"name,omitempty"` // Value: The value of the flag. Booleans should be set to on for true @@ -541,13 +540,11 @@ func (s *DatabaseFlags) MarshalJSON() ([]byte, error) { // DatabaseInstance: A Cloud SQL instance resource. type DatabaseInstance struct { - // BackendType: FIRST_GEN: First Generation instance. MySQL - // only. - // SECOND_GEN: Second Generation instance or PostgreSQL - // instance. - // EXTERNAL: A database server that is not managed by Google. - // This property is read-only; use the tier property in the settings - // object to determine the database type and Second or First Generation. + // BackendType: FIRST_GEN: Basic Cloud SQL instance that runs in a + // Google-managed container. + // SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine + // VM. + // EXTERNAL: A MySQL server that is not managed by Google. BackendType string `json:"backendType,omitempty"` // ConnectionName: Connection name of the Cloud SQL instance used in @@ -557,7 +554,9 @@ type DatabaseInstance struct { // CurrentDiskSize: The current disk usage of the instance in bytes. // This property has been deprecated. Users should use the // "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud - // Monitoring API instead. Please see this announcement for details. + // Monitoring API instead. Please see + // https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for + // details. CurrentDiskSize int64 `json:"currentDiskSize,omitempty,string"` // DatabaseVersion: The database engine type and version. The @@ -567,8 +566,7 @@ type DatabaseInstance struct { // MYSQL_5_6 (default) or MYSQL_5_5 DatabaseVersion string `json:"databaseVersion,omitempty"` - // Etag: This field is deprecated and will be removed from a future - // version of the API. Use the settings.settingsVersion field instead. + // Etag: HTTP 1.1 Entity tag for the resource. Etag string `json:"etag,omitempty"` // FailoverReplica: The name and status of the failover replica. This @@ -627,8 +625,8 @@ type DatabaseInstance struct { // can not be changed after instance creation. Region string `json:"region,omitempty"` - // ReplicaConfiguration: Configuration specific to failover replicas and - // read replicas. + // ReplicaConfiguration: Configuration specific to read-replicas + // replicating from on-premises masters. ReplicaConfiguration *ReplicaConfiguration `json:"replicaConfiguration,omitempty"` // ReplicaNames: The replicas of the instance. @@ -1055,7 +1053,7 @@ func (s *FailoverContext) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Flag: A flag resource. +// Flag: A Google Cloud SQL service flag resource. type Flag struct { // AllowedStringValues: For STRING flags, a list of strings that the // value can be set to. @@ -2142,7 +2140,8 @@ type Settings struct { ActivationPolicy string `json:"activationPolicy,omitempty"` // AuthorizedGaeApplications: The App Engine app IDs that can access - // this instance. First Generation instances only. + // this instance. This property is only applicable to First Generation + // instances. AuthorizedGaeApplications []string `json:"authorizedGaeApplications,omitempty"` // AvailabilityType: Availability type (PostgreSQL instances only). @@ -2165,11 +2164,12 @@ type Settings struct { CrashSafeReplicationEnabled bool `json:"crashSafeReplicationEnabled,omitempty"` // DataDiskSizeGb: The size of data disk, in GB. The data disk size - // minimum is 10GB. Not used for First Generation instances. + // minimum is 10GB. Applies only to Second Generation instances. DataDiskSizeGb int64 `json:"dataDiskSizeGb,omitempty,string"` - // DataDiskType: The type of data disk: PD_SSD (default) or PD_HDD. Not - // used for First Generation instances. + // DataDiskType: The type of data disk. Only supported for Second + // Generation instances. The default type is PD_SSD. Applies only to + // Second Generation instances. DataDiskType string `json:"dataDiskType,omitempty"` // DatabaseFlags: The database flags passed to the instance at startup. @@ -2195,8 +2195,8 @@ type Settings struct { LocationPreference *LocationPreference `json:"locationPreference,omitempty"` // MaintenanceWindow: The maintenance window for this instance. This - // specifies when the instance can be restarted for maintenance - // purposes. Not used for First Generation instances. + // specifies when the instance may be restarted for maintenance + // purposes. Applies only to Second Generation instances. MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` // PricingPlan: The pricing plan for this instance. This can be either @@ -2216,21 +2216,18 @@ type Settings struct { SettingsVersion int64 `json:"settingsVersion,omitempty,string"` // StorageAutoResize: Configuration to increase storage size - // automatically. The default value is true. Not used for First + // automatically. The default value is true. Applies only to Second // Generation instances. StorageAutoResize *bool `json:"storageAutoResize,omitempty"` // StorageAutoResizeLimit: The maximum size to which storage capacity // can be automatically increased. The default value is 0, which - // specifies that there is no limit. Not used for First Generation + // specifies that there is no limit. Applies only to Second Generation // instances. StorageAutoResizeLimit int64 `json:"storageAutoResizeLimit,omitempty,string"` - // Tier: The tier (or machine type) for this instance, for example - // db-n1-standard-1 (MySQL instances) or db-custom-1-3840 (PostgreSQL - // instances). For MySQL instances, this property determines whether the - // instance is First or Second Generation. For more information, see - // Instance Settings. + // Tier: The tier of service for this instance, for example D1, D2. For + // more information, see pricing. Tier string `json:"tier,omitempty"` // UserLabels: User-provided labels, represented as a dictionary where @@ -2600,8 +2597,7 @@ func (s *TruncateLogContext) MarshalJSON() ([]byte, error) { // User: A Cloud SQL user resource. type User struct { - // Etag: This field is deprecated and will be removed from a future - // version of the API. + // Etag: HTTP 1.1 Entity tag for the resource. Etag string `json:"etag,omitempty"` // Host: The host name from which the user can connect. For insert @@ -2619,7 +2615,7 @@ type User struct { Kind string `json:"kind,omitempty"` // Name: The name of the user in the Cloud SQL instance. Can be omitted - // for update since it is already specified in the URL. + // for update since it is already specified on the URL. Name string `json:"name,omitempty"` // Password: The password for the user. @@ -2747,13 +2743,9 @@ func (c *BackupRunsDeleteCall) doRequest(alt string) (*http.Response, error) { 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}/instances/{instance}/backupRuns/{id}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -2910,13 +2902,9 @@ func (c *BackupRunsGetCall) 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}/instances/{instance}/backupRuns/{id}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -3065,13 +3053,9 @@ func (c *BackupRunsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/backupRuns") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -3167,8 +3151,8 @@ type BackupRunsListCall struct { } // List: Lists all backup runs associated with a given instance and -// configuration in the reverse chronological order of the backup -// initiation time. +// configuration in the reverse chronological order of the enqueued +// time. func (r *BackupRunsService) List(project string, instance string) *BackupRunsListCall { c := &BackupRunsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -3237,13 +3221,9 @@ func (c *BackupRunsListCall) 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}/instances/{instance}/backupRuns") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -3290,7 +3270,7 @@ func (c *BackupRunsListCall) Do(opts ...googleapi.CallOption) (*BackupRunsListRe } return ret, nil // { - // "description": "Lists all backup runs associated with a given instance and configuration in the reverse chronological order of the backup initiation time.", + // "description": "Lists all backup runs associated with a given instance and configuration in the reverse chronological order of the enqueued time.", // "httpMethod": "GET", // "id": "sql.backupRuns.list", // "parameterOrder": [ @@ -3409,13 +3389,9 @@ func (c *DatabasesDeleteCall) doRequest(alt string) (*http.Response, error) { 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}/instances/{instance}/databases/{database}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -3572,13 +3548,9 @@ func (c *DatabasesGetCall) 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}/instances/{instance}/databases/{database}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -3726,13 +3698,9 @@ func (c *DatabasesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/databases") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -3881,13 +3849,9 @@ func (c *DatabasesListCall) 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}/instances/{instance}/databases") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -4029,13 +3993,9 @@ func (c *DatabasesPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/databases/{database}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -4188,13 +4148,9 @@ func (c *DatabasesUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/databases/{database}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -4302,8 +4258,8 @@ func (r *FlagsService) List() *FlagsListCall { } // DatabaseVersion sets the optional parameter "databaseVersion": -// Database type and version you want to retrieve flags for. By default, -// this method returns flags for all database types and versions. +// Database version for flag retrieval. Flags are specific to the +// database version. func (c *FlagsListCall) DatabaseVersion(databaseVersion string) *FlagsListCall { c.urlParams_.Set("databaseVersion", databaseVersion) return c @@ -4355,13 +4311,9 @@ func (c *FlagsListCall) 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, "flags") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -4409,7 +4361,7 @@ func (c *FlagsListCall) Do(opts ...googleapi.CallOption) (*FlagsListResponse, er // "id": "sql.flags.list", // "parameters": { // "databaseVersion": { - // "description": "Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions.", + // "description": "Database version for flag retrieval. Flags are specific to the database version.", // "location": "query", // "type": "string" // } @@ -4482,13 +4434,9 @@ func (c *InstancesAddServerCaCall) doRequest(alt string) (*http.Response, error) 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}/instances/{instance}/addServerCa") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -4628,13 +4576,9 @@ func (c *InstancesCloneCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/clone") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -4769,13 +4713,9 @@ func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { 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}/instances/{instance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -4915,13 +4855,9 @@ func (c *InstancesDemoteMasterCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/demoteMaster") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -5064,13 +5000,9 @@ func (c *InstancesExportCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/export") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -5211,13 +5143,9 @@ func (c *InstancesFailoverCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/failover") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -5367,13 +5295,9 @@ func (c *InstancesGetCall) 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}/instances/{instance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -5513,13 +5437,9 @@ func (c *InstancesImportCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/import") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -5658,13 +5578,9 @@ func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -5826,13 +5742,9 @@ func (c *InstancesListCall) 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}/instances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -6011,13 +5923,9 @@ func (c *InstancesListServerCasCall) doRequest(alt string) (*http.Response, erro } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/listServerCas") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -6159,13 +6067,9 @@ func (c *InstancesPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -6301,13 +6205,9 @@ func (c *InstancesPromoteReplicaCall) doRequest(alt string) (*http.Response, err 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}/instances/{instance}/promoteReplica") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -6440,13 +6340,9 @@ func (c *InstancesResetSslConfigCall) doRequest(alt string) (*http.Response, err 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}/instances/{instance}/resetSslConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -6578,13 +6474,9 @@ func (c *InstancesRestartCall) doRequest(alt string) (*http.Response, error) { 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}/instances/{instance}/restart") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -6723,13 +6615,9 @@ func (c *InstancesRestoreBackupCall) 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, "projects/{project}/instances/{instance}/restoreBackup") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -6873,13 +6761,9 @@ func (c *InstancesRotateServerCaCall) doRequest(alt string) (*http.Response, 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}/instances/{instance}/rotateServerCa") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -7014,13 +6898,9 @@ func (c *InstancesStartReplicaCall) doRequest(alt string) (*http.Response, error 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}/instances/{instance}/startReplica") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -7152,13 +7032,9 @@ func (c *InstancesStopReplicaCall) doRequest(alt string) (*http.Response, error) 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}/instances/{instance}/stopReplica") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -7297,13 +7173,9 @@ func (c *InstancesTruncateLogCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/truncateLog") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -7447,13 +7319,9 @@ func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -7501,6 +7369,7 @@ func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro return ret, nil // { // "description": "Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.", + // "etagRequired": true, // "httpMethod": "PUT", // "id": "sql.instances.update", // "parameterOrder": [ @@ -7603,13 +7472,9 @@ func (c *OperationsGetCall) 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}/operations/{operation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -7771,13 +7636,9 @@ func (c *OperationsListCall) 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}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -7950,13 +7811,9 @@ func (c *SslCertsCreateEphemeralCall) doRequest(alt string) (*http.Response, 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}/instances/{instance}/createEphemeral") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -8094,13 +7951,9 @@ func (c *SslCertsDeleteCall) doRequest(alt string) (*http.Response, error) { 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}/instances/{instance}/sslCerts/{sha1Fingerprint}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -8258,13 +8111,9 @@ func (c *SslCertsGetCall) 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}/instances/{instance}/sslCerts/{sha1Fingerprint}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -8413,13 +8262,9 @@ func (c *SslCertsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/sslCerts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -8568,13 +8413,9 @@ func (c *SslCertsListCall) 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}/instances/{instance}/sslCerts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -8719,13 +8560,9 @@ func (c *TiersListCall) 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}/tiers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -8851,13 +8688,9 @@ func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) { 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}/instances/{instance}/users") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -9010,13 +8843,9 @@ func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/users") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -9165,13 +8994,9 @@ func (c *UsersListCall) 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}/instances/{instance}/users") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -9264,22 +9089,16 @@ type UsersUpdateCall struct { } // Update: Updates an existing user in a Cloud SQL instance. -func (r *UsersService) Update(project string, instance string, name string, user *User) *UsersUpdateCall { +func (r *UsersService) Update(project string, instance string, host string, name string, user *User) *UsersUpdateCall { c := &UsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.instance = instance + c.urlParams_.Set("host", host) c.urlParams_.Set("name", name) c.user = user return c } -// Host sets the optional parameter "host": Host of the user in the -// instance. -func (c *UsersUpdateCall) Host(host string) *UsersUpdateCall { - c.urlParams_.Set("host", host) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -9318,13 +9137,9 @@ func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/instances/{instance}/users") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -9377,12 +9192,14 @@ func (c *UsersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "parameterOrder": [ // "project", // "instance", + // "host", // "name" // ], // "parameters": { // "host": { // "description": "Host of the user in the instance.", // "location": "query", + // "required": true, // "type": "string" // }, // "instance": { diff --git a/vendor/google.golang.org/api/storage/v1/storage-api.json b/vendor/google.golang.org/api/storage/v1/storage-api.json index a5b62c6d..7837a661 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-api.json +++ b/vendor/google.golang.org/api/storage/v1/storage-api.json @@ -26,7 +26,7 @@ "description": "Stores and retrieves potentially large, immutable data objects.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/storage/docs/json_api/", - "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/LSpI3fR5lOQdDA6XHHjB1Bie2kU\"", + "etag": "\"Zkyw9ACJZUvcYmlFaKGChzhmtnE/naWmFZqBR_Eg7icNmYvZKp3Vbjs\"", "icons": { "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" @@ -616,7 +616,7 @@ ] }, "patch": { - "description": "Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.", + "description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. This method supports patch semantics.", "httpMethod": "PATCH", "id": "storage.buckets.patch", "parameterOrder": [ @@ -1573,7 +1573,7 @@ ], "parameters": { "destinationBucket": { - "description": "Name of the bucket containing the source objects. The destination object is stored in this bucket.", + "description": "Name of the bucket in which to store the new object.", "location": "path", "required": true, "type": "string" @@ -2035,7 +2035,7 @@ "type": "string" }, "kmsKeyName": { - "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", + "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any. Limited availability; usable only by enabled projects.", "location": "query", "type": "string" }, @@ -2766,7 +2766,7 @@ } } }, - "revision": "20181013", + "revision": "20180518", "rootUrl": "https://www.googleapis.com/", "schemas": { "Bucket": { @@ -2910,10 +2910,6 @@ "description": "Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects.", "type": "boolean" }, - "matchesPattern": { - "description": "A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the \"Early Access\" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released.", - "type": "string" - }, "matchesStorageClass": { "description": "Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.", "items": { @@ -3253,7 +3249,7 @@ "storage.objects.compose" ] }, - "description": "The source object's name. All source objects must reside in the same bucket.", + "description": "The source object's name. The source object's bucket is implicitly the destination bucket.", "type": "string" }, "objectPreconditions": { @@ -3441,7 +3437,7 @@ "type": "string" }, "kmsKeyName": { - "description": "Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key.", + "description": "Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. Limited availability; usable only by enabled projects.", "type": "string" }, "md5Hash": { diff --git a/vendor/google.golang.org/api/storage/v1/storage-gen.go b/vendor/google.golang.org/api/storage/v1/storage-gen.go index fa5e4e24..df5d71f7 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-gen.go +++ b/vendor/google.golang.org/api/storage/v1/storage-gen.go @@ -16,16 +16,15 @@ import ( "encoding/json" "errors" "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" - - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" ) // Always reference these packages, just in case the auto-generated code @@ -550,14 +549,6 @@ type BucketLifecycleRuleCondition struct { // matches archived objects. IsLive *bool `json:"isLive,omitempty"` - // MatchesPattern: A regular expression that satisfies the RE2 syntax. - // This condition is satisfied when the name of the object matches the - // RE2 pattern. Note: This feature is currently in the "Early Access" - // launch stage and is only available to a whitelisted set of users; - // that means that this feature may be changed in backward-incompatible - // ways and that it is not guaranteed to be released. - MatchesPattern string `json:"matchesPattern,omitempty"` - // MatchesStorageClass: Objects having any of the storage classes // specified by this condition will be matched. Values include // MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and @@ -1067,8 +1058,8 @@ type ComposeRequestSourceObjects struct { // Generation: The generation of this object to use as the source. Generation int64 `json:"generation,omitempty,string"` - // Name: The source object's name. All source objects must reside in the - // same bucket. + // Name: The source object's name. The source object's bucket is + // implicitly the destination bucket. Name string `json:"name,omitempty"` // ObjectPreconditions: Conditions that must be met for this operation @@ -1303,7 +1294,8 @@ type Object struct { Kind string `json:"kind,omitempty"` // KmsKeyName: Cloud KMS Key used to encrypt this object, if the object - // is encrypted by such a key. + // is encrypted by such a key. Limited availability; usable only by + // enabled projects. KmsKeyName string `json:"kmsKeyName,omitempty"` // Md5Hash: MD5 hash of the data; encoded using base64. For more @@ -2001,13 +1993,9 @@ func (c *BucketAccessControlsDeleteCall) doRequest(alt string) (*http.Response, 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, "b/{bucket}/acl/{entity}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -2138,13 +2126,9 @@ func (c *BucketAccessControlsGetCall) 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, "b/{bucket}/acl/{entity}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -2293,13 +2277,9 @@ func (c *BucketAccessControlsInsertCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/acl") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -2450,13 +2430,9 @@ func (c *BucketAccessControlsListCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/acl") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -2599,13 +2575,9 @@ func (c *BucketAccessControlsPatchCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/acl/{entity}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -2759,13 +2731,9 @@ func (c *BucketAccessControlsUpdateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/acl/{entity}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -2926,13 +2894,9 @@ func (c *BucketsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "b/{bucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -3094,13 +3058,9 @@ func (c *BucketsGetCall) 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, "b/{bucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -3276,13 +3236,9 @@ func (c *BucketsGetIamPolicyCall) 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, "b/{bucket}/iam") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -3477,13 +3433,9 @@ func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -3718,13 +3670,9 @@ func (c *BucketsListCall) 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, "b") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -3911,13 +3859,9 @@ func (c *BucketsLockRetentionPolicyCall) doRequest(alt string) (*http.Response, 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, "b/{bucket}/lockRetentionPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -4014,9 +3958,9 @@ type BucketsPatchCall struct { header_ http.Header } -// Patch: Patches a bucket. Changes to the bucket will be readable +// Patch: Updates a bucket. Changes to the bucket will be readable // immediately after writing, but configuration changes may take time to -// propagate. +// propagate. This method supports patch semantics. func (r *BucketsService) Patch(bucket string, bucket2 *Bucket) *BucketsPatchCall { c := &BucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.bucket = bucket @@ -4137,13 +4081,9 @@ func (c *BucketsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -4189,7 +4129,7 @@ func (c *BucketsPatchCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { } return ret, nil // { - // "description": "Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.", + // "description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. This method supports patch semantics.", // "httpMethod": "PATCH", // "id": "storage.buckets.patch", // "parameterOrder": [ @@ -4352,13 +4292,9 @@ func (c *BucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/iam") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -4512,13 +4448,9 @@ func (c *BucketsTestIamPermissionsCall) 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, "b/{bucket}/iam/testPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -4740,13 +4672,9 @@ func (c *BucketsUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -4946,13 +4874,9 @@ func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "channels/stop") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -5049,13 +4973,9 @@ func (c *DefaultObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Res 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, "b/{bucket}/defaultObjectAcl/{entity}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -5186,13 +5106,9 @@ func (c *DefaultObjectAccessControlsGetCall) 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, "b/{bucket}/defaultObjectAcl/{entity}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -5342,13 +5258,9 @@ func (c *DefaultObjectAccessControlsInsertCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/defaultObjectAcl") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -5516,13 +5428,9 @@ func (c *DefaultObjectAccessControlsListCall) doRequest(alt string) (*http.Respo } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/defaultObjectAcl") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -5677,13 +5585,9 @@ func (c *DefaultObjectAccessControlsPatchCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/defaultObjectAcl/{entity}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -5837,13 +5741,9 @@ func (c *DefaultObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Res } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/defaultObjectAcl/{entity}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -5990,13 +5890,9 @@ func (c *NotificationsDeleteCall) doRequest(alt string) (*http.Response, error) 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, "b/{bucket}/notificationConfigs/{notification}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -6127,13 +6023,9 @@ func (c *NotificationsGetCall) 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, "b/{bucket}/notificationConfigs/{notification}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -6285,13 +6177,9 @@ func (c *NotificationsInsertCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/notificationConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -6444,13 +6332,9 @@ func (c *NotificationsListCall) 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, "b/{bucket}/notificationConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -6600,13 +6484,9 @@ func (c *ObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, 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, "b/{bucket}/o/{object}/acl/{entity}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -6761,13 +6641,9 @@ func (c *ObjectAccessControlsGetCall) 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, "b/{bucket}/o/{object}/acl/{entity}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -6940,13 +6816,9 @@ func (c *ObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/acl") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -7121,13 +6993,9 @@ func (c *ObjectAccessControlsListCall) doRequest(alt string) (*http.Response, er } var body io.Reader = nil c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/acl") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -7294,13 +7162,9 @@ func (c *ObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/acl/{entity}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -7478,13 +7342,9 @@ func (c *ObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/acl/{entity}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -7701,13 +7561,9 @@ func (c *ObjectsComposeCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{destinationBucket}/o/{destinationObject}/compose") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "destinationBucket": c.destinationBucket, @@ -7763,7 +7619,7 @@ func (c *ObjectsComposeCall) Do(opts ...googleapi.CallOption) (*Object, error) { // ], // "parameters": { // "destinationBucket": { - // "description": "Name of the bucket containing the source objects. The destination object is stored in this bucket.", + // "description": "Name of the bucket in which to store the new object.", // "location": "path", // "required": true, // "type": "string" @@ -8019,13 +7875,9 @@ func (c *ObjectsCopyCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sourceBucket": c.sourceBucket, @@ -8323,13 +8175,9 @@ func (c *ObjectsDeleteCall) doRequest(alt string) (*http.Response, error) { 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, "b/{bucket}/o/{object}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -8545,13 +8393,9 @@ func (c *ObjectsGetCall) 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, "b/{bucket}/o/{object}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -8781,13 +8625,9 @@ func (c *ObjectsGetIamPolicyCall) 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, "b/{bucket}/o/{object}/iam") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -8952,7 +8792,8 @@ func (c *ObjectsInsertCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch in // the Cloud KMS key, of the form // projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, // that will be used to encrypt the object. Overrides the object -// metadata's kms_key_name value, if any. +// metadata's kms_key_name value, if any. Limited availability; usable +// only by enabled projects. func (c *ObjectsInsertCall) KmsKeyName(kmsKeyName string) *ObjectsInsertCall { c.urlParams_.Set("kmsKeyName", kmsKeyName) return c @@ -9086,7 +8927,6 @@ func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o") if c.mediaInfo_ != nil { urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1) @@ -9099,10 +8939,7 @@ func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) { body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) defer cleanup() urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders gensupport.SetGetBody(req, getBody) googleapi.Expand(req.URL, map[string]string{ @@ -9224,7 +9061,7 @@ func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "type": "string" // }, // "kmsKeyName": { - // "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", + // "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any. Limited availability; usable only by enabled projects.", // "location": "query", // "type": "string" // }, @@ -9425,13 +9262,9 @@ func (c *ObjectsListCall) 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, "b/{bucket}/o") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -9720,13 +9553,9 @@ func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -10098,13 +9927,9 @@ func (c *ObjectsRewriteCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "sourceBucket": c.sourceBucket, @@ -10387,13 +10212,9 @@ func (c *ObjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/iam") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -10571,13 +10392,9 @@ func (c *ObjectsTestIamPermissionsCall) 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, "b/{bucket}/o/{object}/iam/testPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -10820,13 +10637,9 @@ func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -11106,13 +10919,9 @@ func (c *ObjectsWatchAllCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/watch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "bucket": c.bucket, @@ -11315,13 +11124,9 @@ func (c *ProjectsServiceAccountGetCall) 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/{projectId}/serviceAccount") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, diff --git a/vendor/google.golang.org/api/transport/dial.go b/vendor/google.golang.org/api/transport/dial.go index c45ff5b2..c4c37191 100644 --- a/vendor/google.golang.org/api/transport/dial.go +++ b/vendor/google.golang.org/api/transport/dial.go @@ -1,4 +1,4 @@ -// Copyright 2015 Google LLC +// Copyright 2015 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/google.golang.org/api/transport/go19.go b/vendor/google.golang.org/api/transport/go19.go index 40e3389d..0177e560 100644 --- a/vendor/google.golang.org/api/transport/go19.go +++ b/vendor/google.golang.org/api/transport/go19.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/google.golang.org/api/transport/grpc/dial.go b/vendor/google.golang.org/api/transport/grpc/dial.go index 187b9325..ed78fce6 100644 --- a/vendor/google.golang.org/api/transport/grpc/dial.go +++ b/vendor/google.golang.org/api/transport/grpc/dial.go @@ -1,4 +1,4 @@ -// Copyright 2015 Google LLC +// Copyright 2015 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -59,9 +59,7 @@ func dial(ctx context.Context, insecure bool, opts []option.ClientOption) (*grpc if o.GRPCConn != nil { return o.GRPCConn, nil } - grpcOpts := []grpc.DialOption{ - grpc.WithWaitForHandshake(), - } + var grpcOpts []grpc.DialOption if insecure { grpcOpts = []grpc.DialOption{grpc.WithInsecure()} } else if !o.NoAuth { diff --git a/vendor/google.golang.org/api/transport/grpc/go18.go b/vendor/google.golang.org/api/transport/grpc/go18.go index 4b29f8ea..a4b4a994 100644 --- a/vendor/google.golang.org/api/transport/grpc/go18.go +++ b/vendor/google.golang.org/api/transport/grpc/go18.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/google.golang.org/api/transport/grpc/not_go18.go b/vendor/google.golang.org/api/transport/grpc/not_go18.go index 01aba678..f509d863 100644 --- a/vendor/google.golang.org/api/transport/grpc/not_go18.go +++ b/vendor/google.golang.org/api/transport/grpc/not_go18.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/google.golang.org/api/transport/http/dial.go b/vendor/google.golang.org/api/transport/http/dial.go index 1ecbd976..5184ff51 100644 --- a/vendor/google.golang.org/api/transport/http/dial.go +++ b/vendor/google.golang.org/api/transport/http/dial.go @@ -1,4 +1,4 @@ -// Copyright 2015 Google LLC +// Copyright 2015 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/google.golang.org/api/transport/http/go18.go b/vendor/google.golang.org/api/transport/http/go18.go index 14ef6e9e..0b01c70e 100644 --- a/vendor/google.golang.org/api/transport/http/go18.go +++ b/vendor/google.golang.org/api/transport/http/go18.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,8 +19,8 @@ package http import ( "net/http" + "contrib.go.opencensus.io/exporter/stackdriver/propagation" "go.opencensus.io/plugin/ochttp" - "google.golang.org/api/transport/http/internal/propagation" ) func addOCTransport(trans http.RoundTripper) http.RoundTripper { diff --git a/vendor/google.golang.org/api/transport/http/internal/propagation/http.go b/vendor/google.golang.org/api/transport/http/internal/propagation/http.go deleted file mode 100644 index 24b4f0d2..00000000 --- a/vendor/google.golang.org/api/transport/http/internal/propagation/http.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// +build go1.8 - -// Package propagation implements X-Cloud-Trace-Context header propagation used -// by Google Cloud products. -package propagation - -import ( - "encoding/binary" - "encoding/hex" - "fmt" - "net/http" - "strconv" - "strings" - - "go.opencensus.io/trace" - "go.opencensus.io/trace/propagation" -) - -const ( - httpHeaderMaxSize = 200 - httpHeader = `X-Cloud-Trace-Context` -) - -var _ propagation.HTTPFormat = (*HTTPFormat)(nil) - -// HTTPFormat implements propagation.HTTPFormat to propagate -// traces in HTTP headers for Google Cloud Platform and Stackdriver Trace. -type HTTPFormat struct{} - -// SpanContextFromRequest extracts a Stackdriver Trace span context from incoming requests. -func (f *HTTPFormat) SpanContextFromRequest(req *http.Request) (sc trace.SpanContext, ok bool) { - h := req.Header.Get(httpHeader) - // See https://cloud.google.com/trace/docs/faq for the header HTTPFormat. - // Return if the header is empty or missing, or if the header is unreasonably - // large, to avoid making unnecessary copies of a large string. - if h == "" || len(h) > httpHeaderMaxSize { - return trace.SpanContext{}, false - } - - // Parse the trace id field. - slash := strings.Index(h, `/`) - if slash == -1 { - return trace.SpanContext{}, false - } - tid, h := h[:slash], h[slash+1:] - - buf, err := hex.DecodeString(tid) - if err != nil { - return trace.SpanContext{}, false - } - copy(sc.TraceID[:], buf) - - // Parse the span id field. - spanstr := h - semicolon := strings.Index(h, `;`) - if semicolon != -1 { - spanstr, h = h[:semicolon], h[semicolon+1:] - } - sid, err := strconv.ParseUint(spanstr, 10, 64) - if err != nil { - return trace.SpanContext{}, false - } - binary.BigEndian.PutUint64(sc.SpanID[:], sid) - - // Parse the options field, options field is optional. - if !strings.HasPrefix(h, "o=") { - return sc, true - } - o, err := strconv.ParseUint(h[2:], 10, 64) - if err != nil { - return trace.SpanContext{}, false - } - sc.TraceOptions = trace.TraceOptions(o) - return sc, true -} - -// SpanContextToRequest modifies the given request to include a Stackdriver Trace header. -func (f *HTTPFormat) SpanContextToRequest(sc trace.SpanContext, req *http.Request) { - sid := binary.BigEndian.Uint64(sc.SpanID[:]) - header := fmt.Sprintf("%s/%d;o=%d", hex.EncodeToString(sc.TraceID[:]), sid, int64(sc.TraceOptions)) - req.Header.Set(httpHeader, header) -} diff --git a/vendor/google.golang.org/api/transport/http/not_go18.go b/vendor/google.golang.org/api/transport/http/not_go18.go index b8e1abe9..628a21a8 100644 --- a/vendor/google.golang.org/api/transport/http/not_go18.go +++ b/vendor/google.golang.org/api/transport/http/not_go18.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/google.golang.org/api/transport/not_go19.go b/vendor/google.golang.org/api/transport/not_go19.go index 73de8aa7..4489bc9b 100644 --- a/vendor/google.golang.org/api/transport/not_go19.go +++ b/vendor/google.golang.org/api/transport/not_go19.go @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/vendor.json b/vendor/vendor.json index 2372078f..306a7cfa 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1369,262 +1369,250 @@ "revisionTime": "2018-08-07T15:59:08Z" }, { - "checksumSHA1": "lzlJpE+9ckMsglkvm02A5gXM5CU=", + "checksumSHA1": "JFE7ss2Xib86P4hGGrXl6NljmxA=", "path": "google.golang.org/api/appengine/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "n3cWSU0kXeaEQze3KDZFlNZl5kM=", + "checksumSHA1": "MTvGk9R8eieLnok6bXbT4i+C9QQ=", "path": "google.golang.org/api/bigquery/v2", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "BMNNdTeP3YL68eLZqTaEvRtlD18=", + "checksumSHA1": "M6UWZjiDthOLBA7Uwx41metBc18=", "path": "google.golang.org/api/cloudbilling/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "SazXPnuSpKAV+JQVb16RB2C+Vb4=", + "checksumSHA1": "N0uPRBuQiO/tvNG5rJA1L0bx46I=", "path": "google.golang.org/api/cloudbuild/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "v3PS7N61p7R14Qg08EFdDuUERQw=", + "checksumSHA1": "M4KP9cR8pFbyJyG15Dbl2JRAgGw=", "path": "google.golang.org/api/cloudfunctions/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "ZmaJvT5IYWAwZs89bLVbssdc2nE=", + "checksumSHA1": "yDxCBT8x1mqK9yWF7OYLJ8M3o/c=", "path": "google.golang.org/api/cloudiot/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "a0+wTh7qUzM+Rsyujc6MbXF1mDo=", + "checksumSHA1": "WtZxVY/iFdmxTGubAtRmn2iB0Wc=", "path": "google.golang.org/api/cloudkms/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "d6yN26t/o4j1z2zIFQ6uFZnDqGc=", + "checksumSHA1": "HNnh57qf3ZZncR6DaUPBDrD1qUQ=", "path": "google.golang.org/api/cloudresourcemanager/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "HM2xRy/QFA+bDdgUra7AQs7qaM4=", + "checksumSHA1": "sMGyS++uulBZHkrdCmRBJdyWhsY=", "path": "google.golang.org/api/cloudresourcemanager/v2beta1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "VOKqB8/mX6/OaA2oWY7D+gbQPXk=", + "checksumSHA1": "bfcUMzf49beod/my4uX3fuapue8=", "path": "google.golang.org/api/composer/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "UcV4Z5676i+kkBsC0CjvQfstvKs=", + "checksumSHA1": "CwrGQTNNqG13g6GYqARaADUagAs=", "path": "google.golang.org/api/compute/v0.beta", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "U7rRDhNN/vQ3tC+ruts/YZgNjBU=", + "checksumSHA1": "/spb8Vj4ltYhU0h7Ab8ilLHQ+cs=", "path": "google.golang.org/api/compute/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "bo40lAnFnRJT1Br3Vl7cRjmSlys=", + "checksumSHA1": "4bhy5p91uwqTx1wSMMjCZTWUAEo=", "path": "google.golang.org/api/container/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "txX0Pz874q7orQm/eqphaPBxCC4=", + "checksumSHA1": "joNKYN3Ys9p72vEzXyMTVlSI5q0=", "path": "google.golang.org/api/container/v1beta1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "7ca32eb868bf53ea2fc406698eb98583a8073d19", + "revisionTime": "2018-09-10T00:04:50Z" }, { - "checksumSHA1": "iDEy4t6NlgTucl27nk1vcmXtZ1s=", + "checksumSHA1": "W0Y+kxLtZF1yGiV+bTmFXSd22Hw=", "path": "google.golang.org/api/dataflow/v1b3", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "eR6po3wl7I4QhJuC/iZ8sbddzPY=", + "checksumSHA1": "xXFRPq6wWR4G/zDHWOrVl7q3hpc=", "path": "google.golang.org/api/dataproc/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "Ww7iqe5p3XaK2mWYsWjpRrObvZo=", + "checksumSHA1": "hQE5OCWtarkwb4RdvM7FOfQ/iKQ=", "path": "google.golang.org/api/discovery/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "MnOswzp9IyBAPOJXu4imVV6p+S8=", + "checksumSHA1": "UyrBKKpY9lX1LW5SpqJ9QKOAOjk=", "path": "google.golang.org/api/dns/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "0ad5a633fea1d4b64bf5e6a01e30d1fc466038e5", + "revisionTime": "2018-09-04T00:04:47Z" }, { - "checksumSHA1": "CXNGSJD+kfyTe35XagEVRnUDUoA=", + "checksumSHA1": "FwEtkf9HkGR598ZRDSIIB+AjW9g=", "path": "google.golang.org/api/dns/v1beta2", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "pQ8cpCoVnSBpbqRNdLIEWT27Ry8=", + "checksumSHA1": "0ThV8eEbpjtxcSKSAnLZKViBam4=", "path": "google.golang.org/api/file/v1beta1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "19ff8768a5c0b8e46ea281065664787eefc24121", + "revisionTime": "2018-09-16T00:04:51Z" }, { - "checksumSHA1": "sdBIpvPJTg/6SjFgFVcRhjlkz0s=", + "checksumSHA1": "RIKH6cQNe0mczH5HxseRIpEYidE=", "path": "google.golang.org/api/gensupport", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { "checksumSHA1": "vN2q4J0jDKFQRGfFQ15cOSILz5s=", "path": "google.golang.org/api/googleapi", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { "checksumSHA1": "1K0JxrUfDqAB3MyRiU1LKjfHyf4=", "path": "google.golang.org/api/googleapi/internal/uritemplates", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { "checksumSHA1": "Mr2fXhMRzlQCgANFm91s536pG7E=", "path": "google.golang.org/api/googleapi/transport", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "qKQG89tzEPt9+a54Sb6kJTNQMds=", + "checksumSHA1": "s2WhavLN+Ul5OfgQbUPoAXgkO4s=", "path": "google.golang.org/api/iam/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "Udn/2xRvKr6bjxdRE9x3Xr7I3+g=", + "checksumSHA1": "U6423i/mbz+0z9yFzxZhFb2z7uQ=", "path": "google.golang.org/api/internal", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "zh9AcT6oNvhnOqb7w7njY48TkvI=", + "checksumSHA1": "HXuMQALvqd+ZLG0pC1l7gX8nNyE=", "path": "google.golang.org/api/iterator", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "gYHBOUUykcCTxG4S1KpYePQxpZg=", + "checksumSHA1": "xJMLTSUjXtclFAPdVo2aWK36ujM=", "path": "google.golang.org/api/logging/v2", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "85n627CZ5hJIYvEInzzV6bQxHvw=", - "path": "google.golang.org/api/monitoring/v3", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-26T23:48:53Z" - }, - { - "checksumSHA1": "UbkxTZQanhUNhfpC0TN8vYFIsho=", + "checksumSHA1": "hgSfTpbLxSzphh16LAhTQ0pq81U=", "path": "google.golang.org/api/option", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "r25WE/53cvtm4E/w3GAoeAPMADQ=", + "checksumSHA1": "16G1qNSumvfn3Z4SO1BhfDSB2OQ=", "path": "google.golang.org/api/pubsub/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "rKuir52tTVC5HhWQselmrf3R36M=", + "checksumSHA1": "AugyQoEhzo0rPtj6n0roQGFZEEM=", "path": "google.golang.org/api/redis/v1beta1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "aOjrh8hgcCQ8rKOhAneyi6UAkVQ=", + "checksumSHA1": "1jBH4gFhCvHr1AHEpDCr1STKbGU=", "path": "google.golang.org/api/runtimeconfig/v1beta1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "GSqtyGJPV/2O0gAJWwiDGjqveuY=", + "checksumSHA1": "3ea6L1iRI2pYoSra50yFYvf8GeY=", "path": "google.golang.org/api/servicemanagement/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "0Qm0XW6gU2sXQL/rgNeU9MiQj4E=", + "checksumSHA1": "btYwZ2kB6S9fgQLa1e9tsu1Tb7M=", "path": "google.golang.org/api/serviceusage/v1beta1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "hhYMbk87VnGluPNpfxuSjl9fXhw=", + "checksumSHA1": "RDGk8oRH1aaPig/vt/oZYTK/djY=", "path": "google.golang.org/api/sourcerepo/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "kmbyLlsem+mIdbjZOWUj1W6axoo=", + "checksumSHA1": "LLvEQakmEu/nK700dPTC8XVmcqI=", "path": "google.golang.org/api/spanner/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "sWV7hhtoU3y9xoSUyY0BC3f7E+Q=", + "checksumSHA1": "sAZlQHsSBQ3N+/DutpkvGIDixlA=", "path": "google.golang.org/api/sqladmin/v1beta4", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "I2poVyp2twpLAT+V6sROyrULE/4=", + "checksumSHA1": "/PVEwdKMFdBNejQaMGpZhv74dB4=", "path": "google.golang.org/api/storage/v1", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "CrH0KDxD6oW5PyazQhXO5Ad3XZg=", + "checksumSHA1": "ff2VA6uoFKnT/k+NnsRQf9aHQGk=", "path": "google.golang.org/api/transport", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "mdXIjUWhayrmF15vJMbB/1hnonY=", + "checksumSHA1": "VInBPd0SOlXFtkIUfRxcgx3ZYEg=", "path": "google.golang.org/api/transport/grpc", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { - "checksumSHA1": "w5tLk5JestmTBkyD9iR1LOEji7s=", + "checksumSHA1": "nW4TGwSr2fOmgCGyYdVObzGenGQ=", "path": "google.golang.org/api/transport/http", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" - }, - { - "checksumSHA1": "sJcKCvjPtoysqyelsB2CQzC5oQI=", - "path": "google.golang.org/api/transport/http/internal/propagation", - "revision": "04bb50b6b83d0e72253821af8cf3252d8e866517", - "revisionTime": "2018-11-02T01:57:16Z" + "revision": "087779f1d2c96357d4c45bd04c4d10d7b5f22736", + "revisionTime": "2018-08-29T00:05:35Z" }, { "checksumSHA1": "Rw0Fk/K5OCGiyOJYAvrd/RZtwBw=", diff --git a/version/version.go b/version/version.go deleted file mode 100644 index b2d946a5..00000000 --- a/version/version.go +++ /dev/null @@ -1,6 +0,0 @@ -package version - -var ( - // ProviderVersion is set during the release process to the release version of the binary - ProviderVersion = "dev" -) diff --git a/website/docs/d/datasource_cloudfunctions_function.html.markdown b/website/docs/d/datasource_cloudfunctions_function.html.markdown index af3862d0..d455f77a 100644 --- a/website/docs/d/datasource_cloudfunctions_function.html.markdown +++ b/website/docs/d/datasource_cloudfunctions_function.html.markdown @@ -45,7 +45,6 @@ exported: * `description` - Description of the function. * `available_memory_mb` - Available memory (in MB) to the function. * `timeout` - Function execution timeout (in seconds). -* `runtime` - The runtime in which the function is running. * `entry_point` - Name of a JavaScript function that will be executed when the Google Cloud Function is triggered. * `trigger_http` - If function is triggered by HTTP, this boolean is set. * `event_trigger` - A source that fires events in response to a condition in another service. Structure is documented below. diff --git a/website/docs/d/datasource_google_iam_role.html.markdown b/website/docs/d/datasource_google_iam_role.html.markdown deleted file mode 100644 index 77aebf4b..00000000 --- a/website/docs/d/datasource_google_iam_role.html.markdown +++ /dev/null @@ -1,36 +0,0 @@ ---- -layout: "google" -page_title: "Google: google_iam_role" -sidebar_current: "docs-google-datasource-iam-role" -description: |- - Get information about a Google IAM Role. ---- - -# google\_iam\_role - -Use this data source to get information about a Google IAM Role. - -```hcl -data "google_iam_role" "roleinfo" { - name = "roles/compute.viewer" -} - -output "the_role_permissions" { - value = "${data.google_iam_role.roleinfo.included_permissions}" -} - -``` - -## Argument Reference - -The following arguments are supported: - -* `name` (Required) - The name of the Role to lookup in the form `roles/{ROLE_NAME}`, `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}` or `projects/{PROJECT_ID}/roles/{ROLE_NAME}` - -## Attributes Reference - -The following attributes are exported: - -* `title` - is a friendly title for the role, such as "Role Viewer" -* `included_permissions` - specifies the list of one or more permissions to include in the custom role, such as - `iam.roles.get` -* `stage` - indicates the stage of a role in the launch lifecycle, such as `GA`, `BETA` or `ALPHA`. diff --git a/website/docs/getting_started.html.markdown b/website/docs/getting_started.html.markdown index 3b0f8abf..4273d8ea 100644 --- a/website/docs/getting_started.html.markdown +++ b/website/docs/getting_started.html.markdown @@ -152,7 +152,7 @@ that it's you making the request. The preferred method of provisioning resources with Terraform is to use a [GCP service account](https://cloud.google.com/docs/authentication/getting-started), a "robot account" that can be granted a limited set of IAM permissions. -From [the service account key page in the Cloud Console](https://console.cloud.google.com/apis/credentials/serviceaccountkey) +From [the service account key page in the Cloud Console](https://pantheon.corp.google.com/apis/credentials/serviceaccountkey) choose an existing account, or create a new one. Next, download the JSON key file. Name it something you can remember, and store it somewhere secure on your machine. diff --git a/website/docs/r/app_engine_application.html.markdown b/website/docs/r/app_engine_application.html.markdown index dd5f1b3d..e1ce7c33 100755 --- a/website/docs/r/app_engine_application.html.markdown +++ b/website/docs/r/app_engine_application.html.markdown @@ -26,7 +26,7 @@ resource "google_project" "my_project" { resource "google_app_engine_application" "app" { project = "${google_project.my_project.project_id}" - location_id = "us-central" + location_id = "us-central' } ``` diff --git a/website/docs/r/binaryauthorization_attestor.html.markdown b/website/docs/r/binaryauthorization_attestor.html.markdown index 6af5322f..1c21dd87 100644 --- a/website/docs/r/binaryauthorization_attestor.html.markdown +++ b/website/docs/r/binaryauthorization_attestor.html.markdown @@ -32,8 +32,7 @@ To get more information about Attestor, see: * How-to Guides * [Official Documentation](https://cloud.google.com/binary-authorization/) -## Example Usage - Binary Authorization Attestor Basic - +## Example Usage ```hcl resource "google_binary_authorization_attestor" "attestor" { diff --git a/website/docs/r/binaryauthorization_policy.html.markdown b/website/docs/r/binaryauthorization_policy.html.markdown index 0a64b0b0..65350d8d 100644 --- a/website/docs/r/binaryauthorization_policy.html.markdown +++ b/website/docs/r/binaryauthorization_policy.html.markdown @@ -32,8 +32,7 @@ To get more information about Policy, see: * How-to Guides * [Official Documentation](https://cloud.google.com/binary-authorization/) -## Example Usage - Binary Authorization Policy Basic - +## Example Usage ```hcl resource "google_binary_authorization_policy" "policy" { diff --git a/website/docs/r/cloudfunctions_function.html.markdown b/website/docs/r/cloudfunctions_function.html.markdown index df76f909..84fe0b9f 100644 --- a/website/docs/r/cloudfunctions_function.html.markdown +++ b/website/docs/r/cloudfunctions_function.html.markdown @@ -76,8 +76,6 @@ Deprecated. Use `event_trigger` instead. * `labels` - (Optional) A set of key/value label pairs to assign to the function. -* `runtime` - (Optional) The runtime in which the function is going to run. If empty, defaults to `"nodejs6"`. - * `environment_variables` - (Optional) A set of key/value environment variable pairs to assign to the function. * `retry_on_failure` - (Optional) Whether the function should be retried on failure. This only applies to bucket and topic triggers, not HTTPS triggers. @@ -85,11 +83,9 @@ Deprecated. Use `event_trigger.failure_policy.retry` instead. The `event_trigger` block supports: -* `event_type` - (Required) The type of event to observe. For example: `"google.storage.object.finalize"`. -See the documentation on [calling Cloud Functions](https://cloud.google.com/functions/docs/calling/) for a full reference. -Only Cloud Storage and Cloud Pub/Sub triggers are supported at this time. -Legacy Cloud Storage and Cloud Pub/Sub triggers are also supported, such as `"providers/cloud.storage/eventTypes/object.change"` -and `"providers/cloud.pubsub/eventTypes/topic.publish"`. +* `event_type` - (Required) The type of event to observe. For example: `"providers/cloud.storage/eventTypes/object.change"` + and `"providers/cloud.pubsub/eventTypes/topic.publish"`. See the documentation on [calling Cloud Functions](https://cloud.google.com/functions/docs/calling/) + for a full reference. Only Cloud Storage and Cloud Pub/Sub triggers are supported at this time. * `resource` - (Required) Required. The name of the resource from which to observe events, for example, `"myBucket"` diff --git a/website/docs/r/composer_environment.html.markdown b/website/docs/r/composer_environment.html.markdown index 2e57de80..dbd50d41 100644 --- a/website/docs/r/composer_environment.html.markdown +++ b/website/docs/r/composer_environment.html.markdown @@ -1,4 +1,3 @@ ---- layout: "google" page_title: "Google: google_composer_environment" sidebar_current: "docs-google-composer-environment" diff --git a/website/docs/r/compute_address.html.markdown b/website/docs/r/compute_address.html.markdown index a8b6fc2a..c0779c30 100644 --- a/website/docs/r/compute_address.html.markdown +++ b/website/docs/r/compute_address.html.markdown @@ -43,27 +43,13 @@ To get more information about Address, see: * [Reserving a Static External IP Address](https://cloud.google.com/compute/docs/instances-and-network) * [Reserving a Static Internal IP Address](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address) - -## Example Usage - Address Basic - +## Example Usage ```hcl resource "google_compute_address" "ip_address" { name = "my-address" } ``` - -## Example Usage - Address With Subnetwork - - ```hcl resource "google_compute_network" "default" { name = "my-network" @@ -84,14 +70,6 @@ resource "google_compute_address" "internal_with_subnet_and_address" { region = "us-central1" } ``` - -## Example Usage - Instance With Ip - - ```hcl resource "google_compute_address" "static" { name = "ipv4-address" diff --git a/website/docs/r/compute_autoscaler.html.markdown b/website/docs/r/compute_autoscaler.html.markdown index 0a835a99..e287880c 100644 --- a/website/docs/r/compute_autoscaler.html.markdown +++ b/website/docs/r/compute_autoscaler.html.markdown @@ -34,13 +34,7 @@ To get more information about Autoscaler, see: * How-to Guides * [Autoscaling Groups of Instances](https://cloud.google.com/compute/docs/autoscaler/) - -## Example Usage - Autoscaler Basic - +## Example Usage ```hcl resource "google_compute_autoscaler" "foobar" { diff --git a/website/docs/r/compute_backend_bucket.html.markdown b/website/docs/r/compute_backend_bucket.html.markdown index 7af594d4..97387ccc 100644 --- a/website/docs/r/compute_backend_bucket.html.markdown +++ b/website/docs/r/compute_backend_bucket.html.markdown @@ -37,13 +37,7 @@ To get more information about BackendBucket, see: * How-to Guides * [Using a Cloud Storage bucket as a load balancer backend](https://cloud.google.com/compute/docs/load-balancing/http/backend-bucket) - -## Example Usage - Backend Bucket Basic - +## Example Usage ```hcl resource "google_compute_backend_bucket" "image_backend" { diff --git a/website/docs/r/compute_disk.html.markdown b/website/docs/r/compute_disk.html.markdown index 649ef011..3f68ccac 100644 --- a/website/docs/r/compute_disk.html.markdown +++ b/website/docs/r/compute_disk.html.markdown @@ -49,13 +49,7 @@ To get more information about Disk, see: state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html). - -## Example Usage - Disk Basic - +## Example Usage ```hcl resource "google_compute_disk" "default" { diff --git a/website/docs/r/compute_firewall.html.markdown b/website/docs/r/compute_firewall.html.markdown index d3b83a9e..67b34ab5 100644 --- a/website/docs/r/compute_firewall.html.markdown +++ b/website/docs/r/compute_firewall.html.markdown @@ -42,13 +42,7 @@ To get more information about Firewall, see: * How-to Guides * [Official Documentation](https://cloud.google.com/vpc/docs/firewalls) - -## Example Usage - Firewall Basic - +## Example Usage ```hcl resource "google_compute_firewall" "default" { diff --git a/website/docs/r/compute_forwarding_rule.html.markdown b/website/docs/r/compute_forwarding_rule.html.markdown index 00c908c6..b2db4481 100644 --- a/website/docs/r/compute_forwarding_rule.html.markdown +++ b/website/docs/r/compute_forwarding_rule.html.markdown @@ -32,13 +32,7 @@ To get more information about ForwardingRule, see: * How-to Guides * [Official Documentation](https://cloud.google.com/compute/docs/load-balancing/network/forwarding-rules) - -## Example Usage - Forwarding Rule Basic - +## Example Usage ```hcl resource "google_compute_forwarding_rule" "default" { diff --git a/website/docs/r/compute_global_address.html.markdown b/website/docs/r/compute_global_address.html.markdown index da9fe39f..5a096ff0 100644 --- a/website/docs/r/compute_global_address.html.markdown +++ b/website/docs/r/compute_global_address.html.markdown @@ -31,13 +31,7 @@ To get more information about GlobalAddress, see: * How-to Guides * [Reserving a Static External IP Address](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address) - -## Example Usage - Global Address Basic - +## Example Usage ```hcl resource "google_compute_global_address" "default" { diff --git a/website/docs/r/compute_health_check.html.markdown b/website/docs/r/compute_health_check.html.markdown index 5cc3a504..3145ee8d 100644 --- a/website/docs/r/compute_health_check.html.markdown +++ b/website/docs/r/compute_health_check.html.markdown @@ -40,13 +40,7 @@ To get more information about HealthCheck, see: * How-to Guides * [Official Documentation](https://cloud.google.com/load-balancing/docs/health-checks) - -## Example Usage - Health Check Basic - +## Example Usage ```hcl resource "google_compute_health_check" "internal-health-check" { @@ -138,12 +132,6 @@ The `http_health_check` block supports: The request path of the HTTP health check request. The default value is /. -* `response` - - (Optional) - The bytes to match against the beginning of the response data. If left empty - (the default value), any response will indicate health. The response data - can only be ASCII. - * `port` - (Optional) The TCP port number for the HTTP health check request. @@ -167,12 +155,6 @@ The `https_health_check` block supports: The request path of the HTTPS health check request. The default value is /. -* `response` - - (Optional) - The bytes to match against the beginning of the response data. If left empty - (the default value), any response will indicate health. The response data - can only be ASCII. - * `port` - (Optional) The TCP port number for the HTTPS health check request. diff --git a/website/docs/r/compute_http_health_check.html.markdown b/website/docs/r/compute_http_health_check.html.markdown index 3f586f0f..61aa7396 100644 --- a/website/docs/r/compute_http_health_check.html.markdown +++ b/website/docs/r/compute_http_health_check.html.markdown @@ -38,13 +38,7 @@ To get more information about HttpHealthCheck, see: * How-to Guides * [Adding Health Checks](https://cloud.google.com/compute/docs/load-balancing/health-checks#legacy_health_checks) - -## Example Usage - Http Health Check Basic - +## Example Usage ```hcl resource "google_compute_http_health_check" "default" { diff --git a/website/docs/r/compute_https_health_check.html.markdown b/website/docs/r/compute_https_health_check.html.markdown index 9901d4c6..17b2797f 100644 --- a/website/docs/r/compute_https_health_check.html.markdown +++ b/website/docs/r/compute_https_health_check.html.markdown @@ -38,13 +38,7 @@ To get more information about HttpsHealthCheck, see: * How-to Guides * [Adding Health Checks](https://cloud.google.com/compute/docs/load-balancing/health-checks#legacy_health_checks) - -## Example Usage - Https Health Check Basic - +## Example Usage ```hcl resource "google_compute_https_health_check" "default" { diff --git a/website/docs/r/compute_instance_template.html.markdown b/website/docs/r/compute_instance_template.html.markdown index e82dae7d..d5e7ab3a 100644 --- a/website/docs/r/compute_instance_template.html.markdown +++ b/website/docs/r/compute_instance_template.html.markdown @@ -286,20 +286,6 @@ The `disk` block supports: * `type` - (Optional) The type of GCE disk, can be either `"SCRATCH"` or `"PERSISTENT"`. -* `disk_encryption_key` - (Optional) Encrypts or decrypts a disk using a customer-supplied encryption key. - - If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key. - - If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance. - - If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. - - Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group. - -The `disk_encryption_key` block supports: - -* `kms_key_self_link` - (Optional) The self link of the encryption key that is stored in Google Cloud KMS - The `network_interface` block supports: * `network` - (Optional) The name or self_link of the network to attach this interface to. diff --git a/website/docs/r/compute_project_metadata.html.markdown b/website/docs/r/compute_project_metadata.html.markdown index 6f5e872e..e262822a 100644 --- a/website/docs/r/compute_project_metadata.html.markdown +++ b/website/docs/r/compute_project_metadata.html.markdown @@ -44,9 +44,3 @@ The following arguments are supported: ## Attributes Reference Only the arguments listed above are exposed as attributes. - -## Import - -This resource can be imported using the project ID: - -`terraform import google_compute_project_metadata.foo my-project-id` diff --git a/website/docs/r/compute_project_metadata_item.html.markdown b/website/docs/r/compute_project_metadata_item.html.markdown index 83c20704..f5f16bfe 100644 --- a/website/docs/r/compute_project_metadata_item.html.markdown +++ b/website/docs/r/compute_project_metadata_item.html.markdown @@ -46,12 +46,3 @@ Project metadata items can be imported using the `key`, e.g. ``` $ terraform import google_compute_project_metadata_item.default my_metadata ``` - -## Timeouts - -This resource provides the following -[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: - -- `create` - Default is 5 minutes. -- `update` - Default is 5 minutes. -- `delete` - Default is 5 minutes. \ No newline at end of file diff --git a/website/docs/r/compute_region_autoscaler.html.markdown b/website/docs/r/compute_region_autoscaler.html.markdown index 1aae2c6f..6288c0bc 100644 --- a/website/docs/r/compute_region_autoscaler.html.markdown +++ b/website/docs/r/compute_region_autoscaler.html.markdown @@ -34,13 +34,7 @@ To get more information about RegionAutoscaler, see: * How-to Guides * [Autoscaling Groups of Instances](https://cloud.google.com/compute/docs/autoscaler/) - -## Example Usage - Region Autoscaler Basic - +## Example Usage ```hcl resource "google_compute_region_autoscaler" "foobar" { diff --git a/website/docs/r/compute_region_disk.html.markdown b/website/docs/r/compute_region_disk.html.markdown index 7be51631..2316a27c 100644 --- a/website/docs/r/compute_region_disk.html.markdown +++ b/website/docs/r/compute_region_disk.html.markdown @@ -49,13 +49,7 @@ To get more information about RegionDisk, see: state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html). - -## Example Usage - Region Disk Basic - +## Example Usage ```hcl resource "google_compute_region_disk" "regiondisk" { diff --git a/website/docs/r/compute_region_instance_group_manager.html.markdown b/website/docs/r/compute_region_instance_group_manager.html.markdown index 9eed98ec..8b8eea0b 100644 --- a/website/docs/r/compute_region_instance_group_manager.html.markdown +++ b/website/docs/r/compute_region_instance_group_manager.html.markdown @@ -124,9 +124,7 @@ The following arguments are supported: resource is modified, a value of `"NONE"` will prevent any of the managed instances from being restarted by Terraform. A value of `"ROLLING_UPDATE"` is supported as a beta feature. A value of `"ROLLING_UPDATE"` requires - `rolling_update_policy` block to be set. This field is deprecated as in - `2.0.0` it has no functionality anymore. It will be removed then. This field - is only present in the `google` provider. + `rolling_update_policy` block to be set. * `target_size` - (Optional) The target number of running instances for this managed instance group. This value should always be explicitly set unless this resource is attached to diff --git a/website/docs/r/compute_route.html.markdown b/website/docs/r/compute_route.html.markdown index 79df921e..018f6569 100644 --- a/website/docs/r/compute_route.html.markdown +++ b/website/docs/r/compute_route.html.markdown @@ -50,13 +50,7 @@ To get more information about Route, see: * How-to Guides * [Using Routes](https://cloud.google.com/vpc/docs/using-routes) - -## Example Usage - Route Basic - +## Example Usage ```hcl resource "google_compute_route" "default" { diff --git a/website/docs/r/compute_router.html.markdown b/website/docs/r/compute_router.html.markdown index b93defe5..a22d0676 100644 --- a/website/docs/r/compute_router.html.markdown +++ b/website/docs/r/compute_router.html.markdown @@ -30,13 +30,7 @@ To get more information about Router, see: * How-to Guides * [Google Cloud Router](https://cloud.google.com/router/docs/) - -## Example Usage - Router Basic - +## Example Usage ```hcl resource "google_compute_router" "foobar" { diff --git a/website/docs/r/compute_snapshot.html.markdown b/website/docs/r/compute_snapshot.html.markdown index 3898e162..7a6e1b9b 100644 --- a/website/docs/r/compute_snapshot.html.markdown +++ b/website/docs/r/compute_snapshot.html.markdown @@ -1,70 +1,29 @@ --- -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in -# .github/CONTRIBUTING.md. -# -# ---------------------------------------------------------------------------- layout: "google" page_title: "Google: google_compute_snapshot" sidebar_current: "docs-google-compute-snapshot" description: |- - Represents a Persistent Disk Snapshot resource. + Creates a new snapshot of a disk within GCE. --- # google\_compute\_snapshot -Represents a Persistent Disk Snapshot resource. +Creates a new snapshot of a disk within GCE. For more information see +[the official documentation](https://cloud.google.com/compute/docs/disks/create-snapshots) +and +[API](https://cloud.google.com/compute/docs/reference/latest/snapshots). -Use snapshots to back up data from your persistent disks. Snapshots are -different from public images and custom images, which are used primarily -to create instances or configure instance templates. Snapshots are useful -for periodic backup of the data on your persistent disks. You can create -snapshots from persistent disks even while they are attached to running -instances. +## Example Usage -Snapshots are incremental, so you can create regular snapshots on a -persistent disk faster and at a much lower cost than if you regularly -created a full image of the disk. +```js +resource "google_compute_snapshot" "default" { + name = "test-snapshot" + source_disk = "test-disk" + zone = "us-central1-a" - -To get more information about Snapshot, see: - -* [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/snapshots) -* How-to Guides - * [Official Documentation](https://cloud.google.com/compute/docs/disks/create-snapshots) - -## Example Usage - Snapshot Basic - - -```hcl -resource "google_compute_snapshot" "snapshot" { - name = "my-snapshot" - source_disk = "${google_compute_disk.persistent.name}" - zone = "us-central1-a" - labels = { - my_label = "%s" - } -} - -data "google_compute_image" "debian" { - family = "debian-9" - project = "debian-cloud" -} - -resource "google_compute_disk" "persistent" { - name = "debian-disk" - image = "${data.google_compute_image.debian.self_link}" - size = 10 - type = "pd-ssd" - zone = "us-central1-a" + labels { + my-label = "my-label-value" + } } ``` @@ -72,128 +31,47 @@ resource "google_compute_disk" "persistent" { The following arguments are supported: +* `name` - (Required) A unique name for the resource, required by GCE. + Changing this forces a new resource to be created. -* `name` - - (Required) - 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. - -* `source_disk` - - (Required) - A reference to the disk used to create this snapshot. +* `zone` - (Required) The zone where the source disk is located. +* `source_disk` - (Required) The disk which will be used as the source of the snapshot. - - - +* `source_disk_encryption_key_raw` - (Optional) A 256-bit [customer-supplied encryption key] + (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption), + encoded in [RFC 4648 base64](https://tools.ietf.org/html/rfc4648#section-4) + to decrypt the source disk. -* `description` - - (Optional) - An optional description of this resource. +* `snapshot_encryption_key_raw` - (Optional) A 256-bit [customer-supplied encryption key] + (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption), + encoded in [RFC 4648 base64](https://tools.ietf.org/html/rfc4648#section-4) + to encrypt this snapshot. -* `labels` - - (Optional) - Labels to apply to this Snapshot. +* `project` - (Optional) The ID of the project in which the resource belongs. If it + is not provided, the provider project is used. -* `zone` - - (Optional) - A reference to the zone where the disk is hosted. - -* `snapshot_encryption_key` - - (Optional) - The customer-supplied encryption key of the snapshot. Required if the - source snapshot is protected by a customer-supplied encryption key. Structure is documented below. - -* `source_disk_encryption_key` - - (Optional) - The customer-supplied encryption key of the source snapshot. Required - if the source snapshot is protected by a customer-supplied encryption - key. Structure is documented below. -* `project` - (Optional) The ID of the project in which the resource belongs. - If it is not provided, the provider project is used. - - -The `snapshot_encryption_key` block supports: - -* `raw_key` - - (Optional) - Specifies a 256-bit customer-supplied encryption key, encoded in - RFC 4648 base64 to either encrypt or decrypt this resource. - -* `sha256` - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied - encryption key that protects this resource. - -The `source_disk_encryption_key` block supports: - -* `raw_key` - - (Optional) - Specifies a 256-bit customer-supplied encryption key, encoded in - RFC 4648 base64 to either encrypt or decrypt this resource. - -* (Deprecated) `snapshot_encryption_key_raw`: (Optional) This is an alias for - `snapshot_encryption_key.0.raw_key`. This field has been deprecated - and will be removed in a future provider version. -* (Deprecated) `source_disk_encryption_key_raw`: (Optional) This is an alias for - `source_disk_encryption_key.0.raw_key`. This field has been deprecated - and will be removed in a future provider version. +* `labels` - (Optional) A set of key/value label pairs to assign to the snapshot. ## Attributes Reference -In addition to the arguments listed above, the following computed attributes are exported: +In addition to the arguments listed above, the following computed attributes are +exported: +* `snapshot_encryption_key_sha256` - The [RFC 4648 base64] + (https://tools.ietf.org/html/rfc4648#section-4) encoded SHA-256 hash of the + [customer-supplied encryption key](https://cloud.google.com/compute/docs/disks/customer-supplied-encryption) + that protects this resource. -* `creation_timestamp` - - Creation timestamp in RFC3339 text format. +* `source_disk_encryption_key_sha256` - The [RFC 4648 base64] + (https://tools.ietf.org/html/rfc4648#section-4) encoded SHA-256 hash of the + [customer-supplied encryption key](https://cloud.google.com/compute/docs/disks/customer-supplied-encryption) + that protects the source disk. -* `snapshot_id` - - The unique identifier for the resource. +* `source_disk_link` - The URI of the source disk. -* `disk_size_gb` - - Size of the snapshot, specified in GB. - -* `storage_bytes` - - A size of the the storage used by the snapshot. As snapshots share - storage, this number is expected to change with snapshot - creation/deletion. - -* `licenses` - - A list of public visible licenses that apply to this snapshot. This - can be because the original image had licenses attached (such as a - Windows image). snapshotEncryptionKey nested object Encrypts the - snapshot using a customer-supplied encryption key. - -* `label_fingerprint` - - The fingerprint used for optimistic locking of this resource. Used - internally during updates. * `self_link` - The URI of the created resource. - -* (Deprecated) `snapshot_encryption_key_sha256`: This is an alias for -`source_disk_encryption_key.0.sha256`. This attribute has been deprecated -and will be removed in a future provider version. -* (Deprecated) `source_disk_encryption_key_sha256`: This attribute has never had -a value and will be removed in a future provider version. - -## Timeouts - -This resource provides the following -[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: - -- `create` - Default is 5 minutes. -- `update` - Default is 5 minutes. -- `delete` - Default is 5 minutes. - -## Import - -Snapshot can be imported using any of these accepted formats: - -``` -$ terraform import google_compute_snapshot.default projects/{{project}}/global/snapshots/{{name}} -$ terraform import google_compute_snapshot.default {{project}}/{{name}} -$ terraform import google_compute_snapshot.default {{name}} -``` +* `label_fingerprint` - The unique fingerprint of the labels. diff --git a/website/docs/r/compute_ssl_certificate.html.markdown b/website/docs/r/compute_ssl_certificate.html.markdown index cb5f8466..c9129b94 100644 --- a/website/docs/r/compute_ssl_certificate.html.markdown +++ b/website/docs/r/compute_ssl_certificate.html.markdown @@ -32,13 +32,7 @@ To get more information about SslCertificate, see: * How-to Guides * [Official Documentation](https://cloud.google.com/load-balancing/docs/ssl-certificates) - -## Example Usage - Ssl Certificate Basic - +## Example Usage ```hcl resource "google_compute_ssl_certificate" "default" { @@ -52,14 +46,6 @@ resource "google_compute_ssl_certificate" "default" { } } ``` - -## Example Usage - Ssl Certificate Random Provider - - ```hcl # You may also want to control name generation explicitly: resource "google_compute_ssl_certificate" "default" { @@ -85,14 +71,6 @@ resource "random_id" "certificate" { } } ``` - -## Example Usage - Ssl Certificate Target Https Proxies - - ```hcl // Using with Target HTTPS Proxies // diff --git a/website/docs/r/compute_ssl_policy.html.markdown b/website/docs/r/compute_ssl_policy.html.markdown index 036c3d1f..c623ee57 100644 --- a/website/docs/r/compute_ssl_policy.html.markdown +++ b/website/docs/r/compute_ssl_policy.html.markdown @@ -31,13 +31,7 @@ To get more information about SslPolicy, see: * How-to Guides * [Using SSL Policies](https://cloud.google.com/compute/docs/load-balancing/ssl-policies) - -## Example Usage - Ssl Policy Basic - +## Example Usage ```hcl resource "google_compute_ssl_policy" "prod-ssl-policy" { diff --git a/website/docs/r/compute_subnetwork.html.markdown b/website/docs/r/compute_subnetwork.html.markdown index c9becf3b..095ff5a1 100644 --- a/website/docs/r/compute_subnetwork.html.markdown +++ b/website/docs/r/compute_subnetwork.html.markdown @@ -53,13 +53,7 @@ To get more information about Subnetwork, see: * [Private Google Access](https://cloud.google.com/vpc/docs/configure-private-google-access) * [Cloud Networking](https://cloud.google.com/vpc/docs/using-vpc) - -## Example Usage - Subnetwork Basic - +## Example Usage ```hcl resource "google_compute_subnetwork" "network-with-private-secondary-ip-ranges" { diff --git a/website/docs/r/compute_target_http_proxy.html.markdown b/website/docs/r/compute_target_http_proxy.html.markdown index 5715cb87..b5ea1d41 100644 --- a/website/docs/r/compute_target_http_proxy.html.markdown +++ b/website/docs/r/compute_target_http_proxy.html.markdown @@ -32,13 +32,7 @@ To get more information about TargetHttpProxy, see: * How-to Guides * [Official Documentation](https://cloud.google.com/compute/docs/load-balancing/http/target-proxies) - -## Example Usage - Target Http Proxy Basic - +## Example Usage ```hcl resource "google_compute_target_http_proxy" "default" { diff --git a/website/docs/r/compute_target_https_proxy.html.markdown b/website/docs/r/compute_target_https_proxy.html.markdown index 0148648e..55c0657d 100644 --- a/website/docs/r/compute_target_https_proxy.html.markdown +++ b/website/docs/r/compute_target_https_proxy.html.markdown @@ -32,13 +32,7 @@ To get more information about TargetHttpsProxy, see: * How-to Guides * [Official Documentation](https://cloud.google.com/compute/docs/load-balancing/http/target-proxies) - -## Example Usage - Target Https Proxy Basic - +## Example Usage ```hcl resource "google_compute_target_https_proxy" "default" { diff --git a/website/docs/r/compute_target_ssl_proxy.html.markdown b/website/docs/r/compute_target_ssl_proxy.html.markdown index 8c1d9ce4..2dbc2e48 100644 --- a/website/docs/r/compute_target_ssl_proxy.html.markdown +++ b/website/docs/r/compute_target_ssl_proxy.html.markdown @@ -34,13 +34,7 @@ To get more information about TargetSslProxy, see: * How-to Guides * [Setting Up SSL proxy for Google Cloud Load Balancing](https://cloud.google.com/compute/docs/load-balancing/tcp-ssl/) - -## Example Usage - Target Ssl Proxy Basic - +## Example Usage ```hcl resource "google_compute_target_ssl_proxy" "default" { diff --git a/website/docs/r/compute_target_tcp_proxy.html.markdown b/website/docs/r/compute_target_tcp_proxy.html.markdown index 89059e86..b7be94c6 100644 --- a/website/docs/r/compute_target_tcp_proxy.html.markdown +++ b/website/docs/r/compute_target_tcp_proxy.html.markdown @@ -34,13 +34,7 @@ To get more information about TargetTcpProxy, see: * How-to Guides * [Setting Up TCP proxy for Google Cloud Load Balancing](https://cloud.google.com/compute/docs/load-balancing/tcp-ssl/tcp-proxy) - -## Example Usage - Target Tcp Proxy Basic - +## Example Usage ```hcl resource "google_compute_target_tcp_proxy" "default" { diff --git a/website/docs/r/compute_vpn_gateway.html.markdown b/website/docs/r/compute_vpn_gateway.html.markdown index 2bd4b01d..ce0ba1b4 100644 --- a/website/docs/r/compute_vpn_gateway.html.markdown +++ b/website/docs/r/compute_vpn_gateway.html.markdown @@ -29,13 +29,7 @@ To get more information about VpnGateway, see: * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/targetVpnGateways) - -## Example Usage - Target Vpn Gateway Basic - +## Example Usage ```hcl resource "google_compute_vpn_gateway" "target_gateway" { diff --git a/website/docs/r/compute_vpn_tunnel.html.markdown b/website/docs/r/compute_vpn_tunnel.html.markdown index 05df2a91..773abe02 100644 --- a/website/docs/r/compute_vpn_tunnel.html.markdown +++ b/website/docs/r/compute_vpn_tunnel.html.markdown @@ -35,13 +35,7 @@ To get more information about VpnTunnel, see: state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html). - -## Example Usage - Vpn Tunnel Basic - +## Example Usage ```hcl resource "google_compute_vpn_tunnel" "tunnel1" { diff --git a/website/docs/r/container_cluster.html.markdown b/website/docs/r/container_cluster.html.markdown index 0b8c0e60..1682d891 100644 --- a/website/docs/r/container_cluster.html.markdown +++ b/website/docs/r/container_cluster.html.markdown @@ -94,11 +94,6 @@ output "cluster_ca_certificate" { * `cluster_ipv4_cidr` - (Optional) The IP address range of the kubernetes pods in this cluster. Default is an automatically assigned CIDR. -* `cluster_autoscaling` - (Optional, [Beta](https://terraform.io/docs/providers/google/provider_versions.html)) - Configuration for cluster autoscaling (also called autoprovisioning), as described in - [the docs](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning). - Structure is documented below. - * `description` - (Optional) Description of the cluster. * `enable_binary_authorization` - (Optional) Enable Binary Authorization for this cluster. @@ -175,10 +170,6 @@ output "cluster_ca_certificate" { * `node_pool` - (Optional) List of node pools associated with this cluster. See [google_container_node_pool](container_node_pool.html) for schema. - **Warning:** node pools defined inside a cluster can't be changed (or added/removed) after - cluster creation without deleting and recreating the entire cluster. Unless you absolutely need the ability - to say "these are the _only_ node pools associated with this cluster", use the - [google_container_node_pool](container_node_pool.html) resource instead of this property. * `node_version` - (Optional) The Kubernetes version on the nodes. Must either be unset or set to the same value as `min_master_version` on create. Defaults to the default @@ -245,21 +236,6 @@ addons_config { } ``` -The `cluster_autoscaling` block supports: -* `enabled` - (Required) Whether cluster autoscaling (also called autoprovisioning) is - enabled. To set this to true, make sure your config meets the rest of the - requirements. Notably, you'll need `min_master_version` of at least `1.11.2`. -* `resource_limits` - (Optional) A list of limits on the autoprovisioning. - See [the docs](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning) - for an explanation of what options are available. If enabling autoprovisioning, make - sure to set at least `cpu` and `memory`. Structure is documented below. - -The `resource_limits` block supports: -* `resource_type` - (Required) See [the docs](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning) - for a list of permitted types - `cpu`, `memory`, and others. -* `minimum` - (Optional) The minimum value for the resource type specified. -* `maximum` - (Optional) The maximum value for the resource type specified. - The `maintenance_policy` block supports: * `daily_maintenance_window` - (Required) Time window specified for daily maintenance operations. diff --git a/website/docs/r/containeranalysis_note.html.markdown b/website/docs/r/containeranalysis_note.html.markdown index bffafbb1..dff7b7eb 100644 --- a/website/docs/r/containeranalysis_note.html.markdown +++ b/website/docs/r/containeranalysis_note.html.markdown @@ -32,13 +32,7 @@ To get more information about Note, see: * How-to Guides * [Official Documentation](https://cloud.google.com/container-analysis/) - -## Example Usage - Container Analysis Note Basic - +## Example Usage ```hcl resource "google_container_analysis_note" "note" { diff --git a/website/docs/r/filestore_instance.html.markdown b/website/docs/r/filestore_instance.html.markdown index 80f83a9a..03fb7cc3 100644 --- a/website/docs/r/filestore_instance.html.markdown +++ b/website/docs/r/filestore_instance.html.markdown @@ -34,13 +34,7 @@ To get more information about Instance, see: * [Use with Kubernetes](https://cloud.google.com/filestore/docs/accessing-fileshares) * [Copying Data In/Out](https://cloud.google.com/filestore/docs/copying-data) - -## Example Usage - Filestore Instance Basic - +## Example Usage ```hcl resource "google_filestore_instance" "instance" { diff --git a/website/docs/r/google_billing_account_iam_binding.md b/website/docs/r/google_billing_account_iam_binding.md deleted file mode 100644 index 3a64364e..00000000 --- a/website/docs/r/google_billing_account_iam_binding.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -layout: "google" -page_title: "Google: google_billing_account_iam_binding" -sidebar_current: "docs-google-billing-account-iam-binding" -description: |- - Allows management of a single binding with an IAM policy for a Google Cloud Platform Billing Account. ---- - -# google\_billing_account_\_iam\_binding - -Allows creation and management of a single binding within IAM policy for -an existing Google Cloud Platform Billing Account. - -~> **Note:** This resource __must not__ be used in conjunction with - `google_billing_account_iam_member` for the __same role__ or they will fight over - what your policy should be. - -## Example Usage - -```hcl -resource "google_billing_account_iam_binding" "binding" { - billing_account_id = "00AA00-000AAA-00AA0A" - role = "roles/billing.viewer" - - members = [ - "user:jane@example.com", - ] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `billing_account_id` - (Required) The billing account id. - -* `role` - (Required) The role that should be applied. - -* `members` - (Required) A list of users that the role should apply to. - -## Attributes Reference - -In addition to the arguments listed above, the following computed attributes are -exported: - -* `etag` - (Computed) The etag of the billing account's IAM policy. - -## Import - -IAM binding imports use space-delimited identifiers; first the resource in question and then the role. These bindings can be imported using the `billing_account_id` and role, e.g. - -``` -$ terraform import google_billing_account_iam_binding.binding "your-billing-account-id roles/viewer" -``` diff --git a/website/docs/r/google_billing_account_iam_member.md b/website/docs/r/google_billing_account_iam_member.md deleted file mode 100644 index 30e4a0d4..00000000 --- a/website/docs/r/google_billing_account_iam_member.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -layout: "google" -page_title: "Google: google_billing_account_iam_member" -sidebar_current: "docs-google-billing-account-iam-member" -description: |- - Allows management of a single member for a single binding on the IAM policy for a Google Cloud Platform Billing Account. ---- - -# google\_billing\_account\_iam\_member - -Allows creation and management of a single member for a single binding within -the IAM policy for an existing Google Cloud Platform Billing Account. - -~> **Note:** This resource __must not__ be used in conjunction with - `google_billing_account_iam_binding` for the __same role__ or they will fight over - what your policy should be. - -## Example Usage - -```hcl -resource "google_billing_account_iam_member" "binding" { - billing_account_id = "00AA00-000AAA-00AA0A" - role = "roles/billing.viewer" - member = "user:jane@example.com" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `billing_account_id` - (Required) The billing account id. - -* `role` - (Required) The role that should be applied. - -* `member` - (Required) The user that the role should apply to. - -## Attributes Reference - -In addition to the arguments listed above, the following computed attributes are -exported: - -* `etag` - (Computed) The etag of the billing account's IAM policy. - -## Import - -IAM member imports use space-delimited identifiers; the resource in question, the role, and the account. This member resource can be imported using the `billing_account_id`, role, and account e.g. - -``` -$ terraform import google_billing_account_iam_member.binding "your-billing-account-id roles/viewer foo@example.com" -``` diff --git a/website/docs/r/google_billing_account_iam_policy.md b/website/docs/r/google_billing_account_iam_policy.md deleted file mode 100644 index 5b0f26e6..00000000 --- a/website/docs/r/google_billing_account_iam_policy.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -layout: "google" -page_title: "Google: google_billing_account_iam_policy" -sidebar_current: "docs-google-billing-account-iam-policy" -description: |- - Allows management of the entire IAM policy for a Google Cloud Platform Billing Account. ---- - -# google\_billing\_account\_iam\_policy - -Allows management of the entire IAM policy for an existing Google Cloud Platform Billing Account. - -~> **Warning:** Billing accounts have a default user that can be **overwritten** -by use of this resource. The safest alternative is to use multiple `google_billing_account_iam_binding` - resources. If you do use this resource, the best way to be sure that you are - not making dangerous changes is to start by importing your existing policy, - and examining the diff very closely. - -~> **Note:** This resource __must not__ be used in conjunction with - `google_billing_account_iam_member` or `google_billing_account_iam_binding` - or they will fight over what your policy should be. - -## Example Usage - -```hcl -resource "google_billing_account_iam_policy" "policy" { - billing_account_id = "00AA00-000AAA-00AA0A" - policy_data = "${data.google_iam_policy.admin.policy_data}" -} - -data "google_iam_policy" "admin" { - binding { - role = "roles/billing.viewer" - - members = [ - "user:jane@example.com", - ] - } -} -``` - -## Argument Reference - -The following arguments are supported: - -* `billing_account_id` - (Required) The billing account id. - -* `policy_data` - (Required) The `google_iam_policy` data source that represents - the IAM policy that will be applied to the billing account. This policy overrides any existing - policy applied to the billing account. - -## Import - -``` -$ terraform import google_billing_account_iam_policy.policy billing-account-id -``` diff --git a/website/docs/r/monitoring_group.html.markdown b/website/docs/r/monitoring_group.html.markdown deleted file mode 100644 index 25a7af32..00000000 --- a/website/docs/r/monitoring_group.html.markdown +++ /dev/null @@ -1,123 +0,0 @@ ---- -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in -# .github/CONTRIBUTING.md. -# -# ---------------------------------------------------------------------------- -layout: "google" -page_title: "Google: google_monitoring_group" -sidebar_current: "docs-google-monitoring-group" -description: |- - The description of a dynamic collection of monitored resources. ---- - -# google\_monitoring\_group - -The description of a dynamic collection of monitored resources. Each group -has a filter that is matched against monitored resources and their -associated metadata. If a group's filter matches an available monitored -resource, then that resource is a member of that group. - - -To get more information about Group, see: - -* [API documentation](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.groups) -* How-to Guides - * [Official Documentation](https://cloud.google.com/monitoring/groups/) - - -## Example Usage - Monitoring Group Basic - - -```hcl -resource "google_monitoring_group" "basic" { - display_name = "New Test Group" - - filter = "resource.metadata.region=\"europe-west2\"" -} -``` - -## Example Usage - Monitoring Group Subgroup - - -```hcl -resource "google_monitoring_group" "parent" { - display_name = "New Test SubGroup" - filter = "resource.metadata.region=\"europe-west2\"" -} - -resource "google_monitoring_group" "subgroup" { - display_name = "New Test SubGroup" - filter = "resource.metadata.region=\"europe-west2\"" - parent_name = "${google_monitoring_group.parent.name}" -} -``` - -## Argument Reference - -The following arguments are supported: - - -* `display_name` - - (Required) - A user-assigned name for this group, used only for display - purposes. - -* `filter` - - (Required) - The filter used to determine which monitored resources - belong to this group. - - -- - - - - -* `parent_name` - - (Optional) - The name of the group's parent, if it has one. The format is - "projects/{project_id_or_number}/groups/{group_id}". For - groups with no parent, parentName is the empty string, "". - -* `is_cluster` - - (Optional) - If true, the members of this group are considered to be a - cluster. The system can perform additional analysis on - groups that are clusters. -* `project` - (Optional) The ID of the project in which the resource belongs. - If it is not provided, the provider project is used. - - -## Attributes Reference - -In addition to the arguments listed above, the following computed attributes are exported: - - -* `name` - - A unique identifier for this group. The format is - "projects/{project_id_or_number}/groups/{group_id}". - - - -## Import - -Group can be imported using any of these accepted formats: - -``` -$ terraform import google_monitoring_group.default {{name}} -``` diff --git a/website/docs/r/monitoring_notification_channel.html.markdown b/website/docs/r/monitoring_notification_channel.html.markdown deleted file mode 100644 index b6303d7f..00000000 --- a/website/docs/r/monitoring_notification_channel.html.markdown +++ /dev/null @@ -1,112 +0,0 @@ ---- -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in -# .github/CONTRIBUTING.md. -# -# ---------------------------------------------------------------------------- -layout: "google" -page_title: "Google: google_monitoring_notification_channel" -sidebar_current: "docs-google-monitoring-notification-channel" -description: |- - A NotificationChannel is a medium through which an alert is delivered - when a policy violation is detected. ---- - -# google\_monitoring\_notification\_channel - -A NotificationChannel is a medium through which an alert is delivered -when a policy violation is detected. Examples of channels include email, SMS, -and third-party messaging applications. Fields containing sensitive information -like authentication tokens or contact info are only partially populated on retrieval. - - -To get more information about NotificationChannel, see: - -* [API documentation](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannels) -* How-to Guides - * [Official Documentation](https://cloud.google.com/monitoring/api/v3/) - - -## Example Usage - Notification Channel Basic - - -```hcl -resource "google_monitoring_notification_channel" "basic" { - display_name = "Test Notification Channel" - type = "email" - labels = { - email_address = "fake_email@blahblah.com" - } -} -``` - -## Argument Reference - -The following arguments are supported: - - -* `type` - - (Required) - The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field. See https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannelDescriptors/list to get the list of valid values such as "email", "slack", etc... - -* `display_name` - - (Required) - An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters. - - -- - - - - -* `labels` - - (Optional) - Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field. - -* `user_labels` - - (Optional) - User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter. - -* `description` - - (Optional) - An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceeed 1024 Unicode characters. - -* `enabled` - - (Optional) - Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future. -* `project` - (Optional) The ID of the project in which the resource belongs. - If it is not provided, the provider project is used. - - -## Attributes Reference - -In addition to the arguments listed above, the following computed attributes are exported: - - -* `name` - - The full REST resource name for this channel. The syntax is: - projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] - The [CHANNEL_ID] is automatically assigned by the server on creation. - -* `verification_status` - - Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being required for channels of this type.This field cannot be modified using a standard UpdateNotificationChannel operation. To change the value of this field, you must call VerifyNotificationChannel. - - - -## Import - -NotificationChannel can be imported using any of these accepted formats: - -``` -$ terraform import google_monitoring_notification_channel.default {{name}} -``` diff --git a/website/docs/r/monitoring_uptime_check_config.html.markdown b/website/docs/r/monitoring_uptime_check_config.html.markdown deleted file mode 100644 index 07ba6842..00000000 --- a/website/docs/r/monitoring_uptime_check_config.html.markdown +++ /dev/null @@ -1,257 +0,0 @@ ---- -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in -# .github/CONTRIBUTING.md. -# -# ---------------------------------------------------------------------------- -layout: "google" -page_title: "Google: google_monitoring_uptime_check_config" -sidebar_current: "docs-google-monitoring-uptime-check-config" -description: |- - This message configures which resources and services to monitor for availability. ---- - -# google\_monitoring\_uptime\_check\_config - -This message configures which resources and services to monitor for availability. - - -To get more information about UptimeCheckConfig, see: - -* [API documentation](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.uptimeCheckConfigs) -* How-to Guides - * [Official Documentation](https://cloud.google.com/monitoring/api/v3/) - - -## Example Usage - Uptime Check Config Http - - -```hcl -resource "google_monitoring_uptime_check_config" "http" { - display_name = "http-uptime-check" - timeout = "60s" - - http_check = { - path = "/some-path" - port = "8010" - } - - monitored_resource { - type = "uptime_url" - labels = { - project_id = "example" - host = "192.168.1.1" - } - } - - content_matchers = { - content = "example" - } -} -``` - -## Example Usage - Uptime Check Tcp - - -```hcl -resource "google_monitoring_uptime_check_config" "tcp_group" { - display_name = "tcp-uptime-check" - timeout = "60s" - - tcp_check = { - port = 888 - } - - resource_group { - resource_type = "INSTANCE" - group_id = "${google_monitoring_group.check.name}" - } -} - - -resource "google_monitoring_group" "check" { - display_name = "uptime-check-group" - filter = "resource.metadata.name=has_substring(\"foo\")" -} -``` - -## Argument Reference - -The following arguments are supported: - - -* `display_name` - - (Required) - A human-friendly name for the uptime check configuration. The display name should be unique within a Stackdriver Workspace in order to make it easier to identify; however, uniqueness is not enforced. - -* `timeout` - - (Required) - The maximum amount of time to wait for the request to complete (must be between 1 and 60 seconds). Accepted formats https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration - - -- - - - - -* `period` - - (Optional) - How often, in seconds, the uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 300s. - -* `content_matchers` - - (Optional) - The expected content on the page the check is run against. Currently, only the first entry in the list is supported, and other entries will be ignored. The server will look for an exact match of the string in the page response's content. This field is optional and should only be specified if a content match is required. Structure is documented below. - -* `selected_regions` - - (Optional) - The list of regions from which the check will be run. Some regions contain one location, and others contain more than one. If this field is specified, enough regions to include a minimum of 3 locations must be provided, or an error message is returned. Not specifying this field will result in uptime checks running from all regions. - -* `is_internal` - - (Optional) - If this is true, then checks are made only from the 'internal_checkers'. If it is false, then checks are made only from the 'selected_regions'. It is an error to provide 'selected_regions' when is_internal is true, or to provide 'internal_checkers' when is_internal is false. - -* `internal_checkers` - - (Optional) - The internal checkers that this check will egress from. If is_internal is true and this list is empty, the check will egress from all the InternalCheckers configured for the project that owns this CheckConfig. Structure is documented below. - -* `http_check` - - (Optional) - Contains information needed to make an HTTP or HTTPS check. Structure is documented below. - -* `tcp_check` - - (Optional) - Contains information needed to make a TCP check. Structure is documented below. - -* `resource_group` - - (Optional) - The group resource associated with the configuration. Structure is documented below. - -* `monitored_resource` - - (Optional) - The monitored resource (https://cloud.google.com/monitoring/api/resources) associated with the configuration. The following monitored resource types are supported for uptime checks: uptime_url gce_instance gae_app aws_ec2_instance aws_elb_load_balancer Structure is documented below. -* `project` - (Optional) The ID of the project in which the resource belongs. - If it is not provided, the provider project is used. - - -The `content_matchers` block supports: - -* `content` - - (Optional) - String or regex content to match (max 1024 bytes) - -The `internal_checkers` block supports: - -* `gcp_zone` - - (Optional) - The GCP zone the uptime check should egress from. Only respected for internal uptime checks, where internal_network is specified. - -* `peer_project_id` - - (Optional) - The GCP project_id where the internal checker lives. Not necessary the same as the workspace project. - -* `name` - - (Optional) - A unique resource name for this InternalChecker. The format is:projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKER_ID].PROJECT_ID is the stackdriver workspace project for the uptime check config associated with the internal checker. - -* `network` - - (Optional) - The GCP VPC network (https://cloud.google.com/vpc/docs/vpc) where the internal resource lives (ex: "default"). - -* `display_name` - - (Optional) - The checker's human-readable name. The display name should be unique within a Stackdriver Workspace in order to make it easier to identify; however, uniqueness is not enforced. - -The `http_check` block supports: - -* `auth_info` - - (Optional) - The authentication information. Optional when creating an HTTP check; defaults to empty. Structure is documented below. - -* `port` - - (Optional) - The port to the page to run the check against. Will be combined with host (specified within the MonitoredResource) and path to construct the full URL. Optional (defaults to 80 without SSL, or 443 with SSL). - -* `headers` - - (Optional) - The list of headers to send as part of the uptime check request. If two headers have the same key and different values, they should be entered as a single header, with the value being a comma-separated list of all the desired values as described at https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). Entering two separate headers with the same key in a Create call will cause the first to be overwritten by the second. The maximum number of headers allowed is 100. - -* `path` - - (Optional) - The path to the page to run the check against. Will be combined with the host (specified within the MonitoredResource) and port to construct the full URL. Optional (defaults to "/"). - -* `use_ssl` - - (Optional) - If true, use HTTPS instead of HTTP to run the check. - -* `mask_headers` - - (Optional) - Boolean specifiying whether to encrypt the header information. Encryption should be specified for any headers related to authentication that you do not wish to be seen when retrieving the configuration. The server will be responsible for encrypting the headers. On Get/List calls, if mask_headers is set to True then the headers will be obscured with ******. - - -The `auth_info` block supports: - -* `password` - - (Optional) - The password to authenticate. - -* `username` - - (Optional) - The username to authenticate. - -The `tcp_check` block supports: - -* `port` - - (Required) - The port to the page to run the check against. Will be combined with host (specified within the MonitoredResource) to construct the full URL. - -The `resource_group` block supports: - -* `resource_type` - - (Optional) - The resource type of the group members. - -* `group_id` - - (Optional) - The group of resources being monitored. Should be the `name` of a group - -The `monitored_resource` block supports: - -* `type` - - (Required) - The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.monitoredResourceDescriptors#MonitoredResourceDescriptor) object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types (https://cloud.google.com/monitoring/api/resources) and Logging resource types (https://cloud.google.com/logging/docs/api/v2/resource-list). - -* `labels` - - (Required) - Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone". - -## Attributes Reference - -In addition to the arguments listed above, the following computed attributes are exported: - - -* `name` - - A unique resource name for this UptimeCheckConfig. The format is:projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]. on create the resource name is assigned by the server and included in the response. - - - -## Import - -UptimeCheckConfig can be imported using any of these accepted formats: - -``` -$ terraform import google_monitoring_uptime_check_config.default {{name}} -``` diff --git a/website/docs/r/redis_instance.html.markdown b/website/docs/r/redis_instance.html.markdown index b848ce6d..bf639dab 100644 --- a/website/docs/r/redis_instance.html.markdown +++ b/website/docs/r/redis_instance.html.markdown @@ -30,13 +30,7 @@ To get more information about Instance, see: * How-to Guides * [Official Documentation](https://cloud.google.com/memorystore/docs/redis/) - -## Example Usage - Redis Instance Basic - +## Example Usage ```hcl resource "google_redis_instance" "cache" { @@ -44,14 +38,6 @@ resource "google_redis_instance" "cache" { memory_size_gb = 1 } ``` - -## Example Usage - Redis Instance Full - - ```hcl resource "google_redis_instance" "cache" { name = "ha-memory-cache" @@ -119,8 +105,6 @@ The following arguments are supported: * `redis_configs` - (Optional) Redis configuration parameters, according to http://redis.io/topics/config. - Please check Memorystore documentation for the list of supported parameters: - https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs * `location_id` - (Optional) @@ -188,8 +172,8 @@ This resource provides the following [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: - `create` - Default is 6 minutes. -- `update` - Default is 6 minutes. -- `delete` - Default is 6 minutes. +- `update` - Default is 4 minutes. +- `delete` - Default is 4 minutes. ## Import diff --git a/website/docs/r/resourcemanager_lien.html.markdown b/website/docs/r/resourcemanager_lien.html.markdown index 02599a31..667a1aa9 100644 --- a/website/docs/r/resourcemanager_lien.html.markdown +++ b/website/docs/r/resourcemanager_lien.html.markdown @@ -25,8 +25,7 @@ A Lien represents an encumbrance on the actions that can be performed on a resou -## Example Usage - Resource Manager Lien - +## Example Usage ```hcl resource "google_resource_manager_lien" "lien" { diff --git a/website/docs/r/spanner_database.html.markdown b/website/docs/r/spanner_database.html.markdown index 9360ff59..b194ea9a 100644 --- a/website/docs/r/spanner_database.html.markdown +++ b/website/docs/r/spanner_database.html.markdown @@ -6,7 +6,7 @@ description: |- Creates a Google Spanner Database within a Spanner Instance. --- -# google\_spanner\_database +# google\_spanner\_instance Creates a Google Spanner Database within a Spanner Instance. For more information, see the [official documentation](https://cloud.google.com/spanner/), or the [JSON API](https://cloud.google.com/spanner/docs/reference/rest/v1/projects.instances.databases). diff --git a/website/docs/r/sql_database_instance.html.markdown b/website/docs/r/sql_database_instance.html.markdown index 07c83b03..7a2a2a5d 100644 --- a/website/docs/r/sql_database_instance.html.markdown +++ b/website/docs/r/sql_database_instance.html.markdown @@ -205,8 +205,6 @@ The optional `settings.ip_configuration` subblock supports: * `require_ssl` - (Optional) True if mysqld should default to `REQUIRE X509` for users connecting over IP. -* `private_network` - (Optional) The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. - The optional `settings.ip_configuration.authorized_networks[]` sublist supports: * `expiration_time` - (Optional) The [RFC 3339](https://tools.ietf.org/html/rfc3339) diff --git a/website/docs/r/sql_ssl_cert.html.markdown b/website/docs/r/sql_ssl_cert.html.markdown deleted file mode 100644 index 08a23247..00000000 --- a/website/docs/r/sql_ssl_cert.html.markdown +++ /dev/null @@ -1,63 +0,0 @@ ---- -layout: "google" -page_title: "Google: google_sql_ssl_cert" -sidebar_current: "docs-google-sql-ssl-cert" -description: |- - Creates a new SQL Ssl Cert in Google Cloud SQL. ---- - -# google\_sql\_ssl\_cert - -Creates a new Google SQL SSL Cert on a Google SQL Instance. For more information, see the [official documentation](https://cloud.google.com/sql/), or the [JSON API](https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/sslCerts). - -~> **Note:** All arguments including the private key will be stored in the raw state as plain-text. -[Read more about sensitive data in state](/docs/state/sensitive-data.html). - -## Example Usage - -Example creating a SQL Client Certificate. - -```hcl -resource "google_sql_database_instance" "master" { - name = "master-instance" - - settings { - tier = "D0" - } -} - -resource "google_sql_ssl_cert" "client_cert" { - common_name = "client-name" - instance = "${google_sql_database_instance.master.name}" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `instance` - (Required) The name of the Cloud SQL instance. Changing this - forces a new resource to be created. - -* `common_name` - (Required) The common name to be used in the certificate to identify the - client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created. - - -## Attributes Reference - -In addition to the arguments listed above, the following computed attributes are -exported: - -* `sha1_fingerprint` - The SHA1 Fingerprint of the certificate. -* `private_key` - The private key associated with the client certificate. -* `server_ca_cert` - The CA cert of the server this client cert was generated from. -* `cert` - The actual certificate data for this client certificate. -* `cert_serial_number` - The serial number extracted from the certificate data. -* `create_time` - The time when the certificate was created in RFC 3339 format, - for example 2012-11-15T16:19:00.094Z. -* `expiration_time` - The time when the certificate expires in RFC 3339 format, - for example 2012-11-15T16:19:00.094Z. - -## Import - -Since the contents of the certificate cannot be accessed after its creation, this resource cannot be imported. diff --git a/website/docs/r/storage_bucket.html.markdown b/website/docs/r/storage_bucket.html.markdown index 053f3629..29b46fdf 100644 --- a/website/docs/r/storage_bucket.html.markdown +++ b/website/docs/r/storage_bucket.html.markdown @@ -10,9 +10,7 @@ description: |- Creates a new bucket in Google cloud storage service (GCS). Once a bucket has been created, its location can't be changed. -[ACLs](https://cloud.google.com/storage/docs/access-control/lists) can be applied -using the [`google_storage_bucket_acl` resource](/docs/providers/google/r/storage_bucket_acl.html). - +[ACLs](https://cloud.google.com/storage/docs/access-control/lists) can be applied using the `google_storage_bucket_acl` resource. For more information see [the official documentation](https://cloud.google.com/storage/docs/overview) and diff --git a/website/docs/r/storage_default_object_access_control.html.markdown b/website/docs/r/storage_default_object_access_control.html.markdown deleted file mode 100644 index 17881b23..00000000 --- a/website/docs/r/storage_default_object_access_control.html.markdown +++ /dev/null @@ -1,139 +0,0 @@ ---- -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in -# .github/CONTRIBUTING.md. -# -# ---------------------------------------------------------------------------- -layout: "google" -page_title: "Google: google_storage_default_object_access_control" -sidebar_current: "docs-google-storage-default-object-access-control" -description: |- - The DefaultObjectAccessControls resources represent the Access Control - Lists (ACLs) applied to a new object within a Google Cloud Storage bucket - when no ACL was provided for that object. ---- - -# google\_storage\_default\_object\_access\_control - -The DefaultObjectAccessControls resources represent the Access Control -Lists (ACLs) applied to a new object within a Google Cloud Storage bucket -when no ACL was provided for that object. ACLs let you specify who has -access to your bucket contents and to what extent. - -There are two roles that can be assigned to an entity: - -READERs can get an object, though the acl property will not be revealed. -OWNERs are READERs, and they can get the acl property, update an object, -and call all objectAccessControls methods on the object. The owner of an -object is always an OWNER. -For more information, see Access Control, with the caveat that this API -uses READER and OWNER instead of READ and FULL_CONTROL. - - -To get more information about DefaultObjectAccessControl, see: - -* [API documentation](https://cloud.google.com/storage/docs/json_api/v1/defaultObjectAccessControls) -* How-to Guides - * [Official Documentation](https://cloud.google.com/storage/docs/access-control/create-manage-lists) - - -## Example Usage - Storage Default Object Access Control Public - - -```hcl -resource "google_storage_default_object_access_control" "public_rule" { - bucket = "${google_storage_bucket.bucket.name}" - role = "READER" - entity = "allUsers" -} - -resource "google_storage_bucket" "bucket" { - name = "static-content-bucket" -} -``` - -## Argument Reference - -The following arguments are supported: - - -* `bucket` - - (Required) - The name of the bucket. - -* `entity` - - (Required) - The entity holding the permission, in one of the following forms: - * user-{{userId}} - * user-{{email}} (such as "user-liz@example.com") - * group-{{groupId}} - * group-{{email}} (such as "group-example@googlegroups.com") - * domain-{{domain}} (such as "domain-example.com") - * project-team-{{projectId}} - * allUsers - * allAuthenticatedUsers - -* `role` - - (Required) - The access permission for the entity. - - -- - - - - -* `object` - - (Optional) - The name of the object, if applied to an object. - - -## Attributes Reference - -In addition to the arguments listed above, the following computed attributes are exported: - - -* `domain` - - The domain associated with the entity. - -* `email` - - The email address associated with the entity. - -* `entity_id` - - The ID for the entity - -* `generation` - - The content generation of the object, if applied to an object. - -* `project_team` - - The project team associated with the entity Structure is documented below. - - -The `project_team` block contains: - -* `project_number` - - (Optional) - The project team associated with the entity - -* `team` - - (Optional) - The team. - - -## Import - -DefaultObjectAccessControl can be imported using any of these accepted formats: - -``` -$ terraform import google_storage_default_object_access_control.default {{bucket}}/{{entity}} -``` diff --git a/website/docs/r/storage_default_object_acl.html.markdown b/website/docs/r/storage_default_object_acl.html.markdown index 7f9651fd..96f05e61 100644 --- a/website/docs/r/storage_default_object_acl.html.markdown +++ b/website/docs/r/storage_default_object_acl.html.markdown @@ -9,18 +9,10 @@ description: |- # google\_storage\_default\_object\_acl Creates a new default object ACL in Google Cloud Storage service (GCS). For more information see - --> Note that for each object, its creator will have the `"OWNER"` role in addition -to the default ACL that has been defined. - -For more information see [the official documentation](https://cloud.google.com/storage/docs/access-control/lists) and [API](https://cloud.google.com/storage/docs/json_api/v1/defaultObjectAccessControls). --> Want fine-grained control over default object ACLs? Use `google_storage_default_object_access_control` -to control individual role entity pairs. - ## Example Usage Example creating a default object ACL on a bucket with one owner, and one reader. diff --git a/website/docs/r/storage_object_access_control.html.markdown b/website/docs/r/storage_object_access_control.html.markdown deleted file mode 100644 index 027b166e..00000000 --- a/website/docs/r/storage_object_access_control.html.markdown +++ /dev/null @@ -1,143 +0,0 @@ ---- -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in -# .github/CONTRIBUTING.md. -# -# ---------------------------------------------------------------------------- -layout: "google" -page_title: "Google: google_storage_object_access_control" -sidebar_current: "docs-google-storage-object-access-control" -description: |- - The ObjectAccessControls resources represent the Access Control Lists - (ACLs) for objects within Google Cloud Storage. ---- - -# google\_storage\_object\_access\_control - -The ObjectAccessControls resources represent the Access Control Lists -(ACLs) for objects within Google Cloud Storage. ACLs let you specify -who has access to your data and to what extent. - -There are two roles that can be assigned to an entity: - -READERs can get an object, though the acl property will not be revealed. -OWNERs are READERs, and they can get the acl property, update an object, -and call all objectAccessControls methods on the object. The owner of an -object is always an OWNER. -For more information, see Access Control, with the caveat that this API -uses READER and OWNER instead of READ and FULL_CONTROL. - - -To get more information about ObjectAccessControl, see: - -* [API documentation](https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls) -* How-to Guides - * [Official Documentation](https://cloud.google.com/storage/docs/access-control/create-manage-lists) - - -## Example Usage - Storage Object Access Control Public Object - -```hcl -resource "google_storage_object_access_control" "public_rule" { - object = "${google_storage_bucket_object.object.name}" - bucket = "${google_storage_bucket.bucket.name}" - role = "READER" - entity = "allUsers" -} - -resource "google_storage_bucket" "bucket" { - name = "static-content-bucket" -} - - resource "google_storage_bucket_object" "object" { - name = "public-object" - bucket = "${google_storage_bucket.bucket.name}" - source = "../static/img/header-logo.png" -} -``` - -## Argument Reference - -The following arguments are supported: - - -* `bucket` - - (Required) - The name of the bucket. - -* `entity` - - (Required) - The entity holding the permission, in one of the following forms: - * user-{{userId}} - * user-{{email}} (such as "user-liz@example.com") - * group-{{groupId}} - * group-{{email}} (such as "group-example@googlegroups.com") - * domain-{{domain}} (such as "domain-example.com") - * project-team-{{projectId}} - * allUsers - * allAuthenticatedUsers - -* `object` - - (Required) - The name of the object to apply the access control to. - -* `role` - - (Required) - The access permission for the entity. - - -- - - - - - -## Attributes Reference - -In addition to the arguments listed above, the following computed attributes are exported: - - -* `domain` - - The domain associated with the entity. - -* `email` - - The email address associated with the entity. - -* `entity_id` - - The ID for the entity - -* `generation` - - The content generation of the object, if applied to an object. - -* `project_team` - - The project team associated with the entity Structure is documented below. - - -The `project_team` block contains: - -* `project_number` - - (Optional) - The project team associated with the entity - -* `team` - - (Optional) - The team. - - -## Import - -ObjectAccessControl can be imported using any of these accepted formats: - -``` -$ terraform import google_storage_object_access_control.default {{bucket}}/{{object}}/{{entity}} -``` diff --git a/website/google.erb b/website/google.erb index 6d30ba7d..21ca810a 100644 --- a/website/google.erb +++ b/website/google.erb @@ -3,7 +3,7 @@